2017 © Pedro Peláez
 

library laravel-tmdb

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

image

okaufmann/laravel-tmdb

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  • Tuesday, January 10, 2017
  • by okaufmann
  • Repository
  • 1 Watchers
  • 1 Stars
  • 24 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 34 Versions
  • 0 % Grown

The README.md

LaravelTmdb

LaravelTmdb was created by, and is maintained by Oliver Kaufmann. Feel free to check out the change log, releases, license, and contribution guidelines., (*1)

Forked

This Repo is a fork of the official The Movie DB Client. It was modified and simplified to match my own needs., (*2)

Please point donations and fame to the base repo without this packages wouldn't be possible!, (*3)

Differences - Removed Event based Request handling - Removed Guzzle 5 and integrated Guzzle 6 - Removed Logging - Integrate Laravel-Support and Client into one package - Plugins not working atm., (*4)

Features

Main features, (*5)

  • An complete integration of all the TMDB API has to offer ( accounts, movies, tv etc. if something is missing I haven't added the updates yet! ).
  • Array implementation of the movie database ( RAW )
  • Model implementation of the movie database ( By making use of the repositories )
  • An ImageHelper class to help build image urls or html elements.

Other things worth mentioning, (*6)

  • Retry subscriber enabled by default to handle any rate limit errors.
  • Caching subscriber enabled by default, based on max-age headers returned by TMDB, requires doctrine-cache.
  • Logging subscriber and is optional, requires monolog. Could prove useful during development.

Installation

PHP 7.0+ is required., (*7)

To get the latest version of LaravelTmdb, simply require the project using Composer:, (*8)

$ composer require okaufmann/laravel-tmdb

Configuration

LaravelTmdb provides a configuration example., (*9)

So you can test publishing assets with:, (*10)

$ php artisan vendor:publish --provider="Okaufmann\LaravelTmdb\LaravelTmdbServiceProvider"

This will create a config/laraveltmdb file in your app that you can modify to set your configuration. Also, make sure you check for changes to the original config file in this package between releases., (*11)

Notice: You have to use an key for the API of The Movie DB. You can create one here: https://www.themoviedb.org/documentation/api., (*12)

Usage

To use the Client just need to add it to your Method parameters and it will be injected., (*13)

class MovieController extends Controller
{
    private $client;

    public function __construct(LaravelTmdb $client){
        $this->client = $client;
    }
}

General API Usage (Get json response)

If your looking for a simple array entry point the API namespace is the place to be., (*14)

$movie = $client->getMoviesApi()->getMovie(550);

If you want to provide any other query arguments., (*15)

$movie = $client->getMoviesApi()->getMovie(550, ['language' => 'en']);

Model Usage (working with full typed response)

However the library can also be used in an object oriented manner, which I reckon is the preferred way of doing things., (*16)

Instead of calling upon the client, you pass the client onto one of the many repositories and do then some work on it., (*17)

$repository = new \Tmdb\Repository\MovieRepository($client);
$movie      = $repository->load(87421);

echo $movie->getTitle();

The repositories also contain the other API methods that are available through the API namespace., (*18)

$repository = new \Tmdb\Repository\MovieRepository($client);
$topRated = $repository->getTopRated(array('page' => 3));
// or
$popular = $repository->getPopular();
Further Information

Review the official API Documentation here: https://developers.themoviedb.org/3/getting-started or the base repos readme here: https://github.com/php-tmdb/api/blob/2.0/README.md., (*19)

There are other classes in this package that are not documented here. This is because they are not intended for public use and are used internally by this package., (*20)

License

LaravelTmdb is licensed under The MIT License (MIT)., (*21)

The Versions

10/01 2017

dev-master

9999999-dev

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

02/10 2016

v3.0.0

3.0.0.0

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

07/04 2016

v2.0.17

2.0.17.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

06/04 2016

v2.0.16

2.0.16.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

11/03 2016

v2.0.15

2.0.15.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

09/03 2016

v2.0.14

2.0.14.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

11/10 2015

v2.0.13

2.0.13.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

17/09 2015

v2.0.12

2.0.12.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

12/09 2015

v2.0.11

2.0.11.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

22/07 2015

v2.0.10

2.0.10.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

11/07 2015

v2.0.9

2.0.9.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

21/06 2015

v2.0.8

2.0.8.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

04/04 2015

v2.0.7

2.0.7.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

26/03 2015

v2.0.6

2.0.6.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

26/03 2015

v2.0.5

2.0.5.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

25/03 2015

v2.0.4

2.0.4.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

10/03 2015

v2.0.3

2.0.3.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

01/02 2015

v2.0.2

2.0.2.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

26/01 2015

v2.0.1

2.0.1.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

25/01 2015

v2.0.0

2.0.0.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

31/07 2014

v1.4.2

1.4.2.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

13/07 2014

v1.4.1

1.4.1.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

13/07 2014

v1.4.0

1.4.0.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

09/07 2014

v1.3.0

1.3.0.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

10/04 2014

v1.2.0

1.2.0.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

05/04 2014

v1.1.1

1.1.1.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

05/04 2014

v1.1.0

1.1.0.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

25/03 2014

v1.0.0

1.0.0.0 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

15/03 2014

v1.0.0-BETA1

1.0.0.0-beta1 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

08/03 2014

v1.0.0-ALPHA5

1.0.0.0-alpha5 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

03/03 2014

v1.0.0-ALPHA4

1.0.0.0-alpha4 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

02/03 2014

v1.0.0-ALPHA3

1.0.0.0-alpha3 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

28/02 2014

v1.0.0-ALPHA2

1.0.0.0-alpha2 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show

27/02 2014

v1.0.0-ALPHA1

1.0.0.0-alpha1 https://github.com/wtfzdotnet/php-tmdb-api

PHP wrapper for TMDB (TheMovieDatabase) API v3. Supports two types of approaches, one modelled with repositories, models and factories. And the other by simple array access to RAW data from The Movie Database.

  Sources   Download

MIT

The Requires

 

The Development Requires

api php wrapper tv movie tvdb tmdb tv show