Giter VIP home page Giter VIP logo

tmdb4php's Introduction

TMDB4PHP

PHP wrapper classes for TMDB (TheMovieDatabase) API v3.

Thanks to:
Calibrate (www.calibrate.be)

Requirements:

  • PHP 5.3+
  • Curl
  • TMDB Api-key

Basic usage:

require_once('vendor/autoload.php');

$db = TMDB\Client::getInstance('<your api-key>');
$db->adult = true;  // return adult content
$db->paged = false; // merges all paged results into a single result automatically

$title = 'The Matrix';
$year = '1999';

$results = $db->search('movie', array('query'=>$title, 'year'=>$year));

$movie = reset($results);
$images = $movie->posters('300');

TMDB\Client contains the API wrapper for querying TMDB. Results are transformed into the helper objects automatically.
For example searching for 'movie' will result in a array of Movie objects.

More info will come soon.

Assets

Several objects are defined for the 'assets' TMDB uses. These include:

  • Movie
  • Person
  • Company
  • Collection
  • Genre

You can create a new asset and have it filled in with information automatically by passing in the id in the constructor.

For example:

$movie = new Movie(10);

Will load a movie object with the info for a movie with tmdb id 10;

tmdb4php's People

Contributors

breuls avatar jasrags avatar kriboogh avatar shnhrrsn avatar thefrozenfire avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.