PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of vincent FALIES   tmdb   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: tmdb
Search for movies using the TMDB API
Author: By
Last change: Remove PHPEye badge
Update README.md
Update README.md
Update README.md
Date: 4 years ago
Size: 2,491 bytes
 

Contents

Class file image Download

Tmdb - PHP Wrapper for The Movie Database API V3

Latest Stable Version Build Status Code Coverage Scrutinizer Code Quality License SensioLabsInsight

Tmdb is a PHP wrapper for The Movie Database API V3.

Features actualy supported :

  • Search - Movie - TV Show - Collection - Company
  • Getting informations - Movie - TV Show - Collection - Company - Genres
  • Account - Authentification - Movies / TV Shows rating - Movies / TV Shows favorites - Movies / TV Shows watchlist
  • Media
  • Genres
  • Jobs

Installation

Install the lastest version with

$ composer require vfalies/tmdb

Basic Usage

<?php

require 'vendor/autoload.php';

use VfacTmdb\Factory;
use VfacTmdb\Search;
use VfacTmdb\Item;

// Initialize Wrapper
$tmdb = Factory::create()->getTmdb('your_api_key');

// Search a movie
$search    = new Search($tmdb);
$responses = $search->movie('star wars');

// Get all results
foreach ($responses as $response)
{
    echo $response->getTitle();
}

// Get movie information
$item  = new Item($tmdb);
$infos = $item->getMovie(11, array('language' => 'fr-FR'));

echo $infos->getTitle();

Unit Testing

You can run the unit test suites using the following command in the library's source directory:

$ make test

About

Requirements

  • Tmdb works with PHP 7.1 and higher
  • TheMovieDatabase API key

Submitting bugs and feature requests

Bugs and feature request are tracked on GitHub

Author

Vincent Faliès - <vincent@vfac.fr>

License

VfacTmdb is licensed under the MIT License - see the LICENSE file for details