PHP Classes

tmdb: Search for movies using the TMDB API

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 79 All time: 10,129 This week: 53Up
Version License PHP version Categories
tmdb 1.7Custom (specified...7.1Web services, PHP 7, Traits
Description 

Author

This package can search for movies using the TMDB API.

It can send HTTP requests to the TMDB API Web server to perform search operations for movies with given keywords in the titles.

The package can also retrieve the details of the individual movies found in the search.

Picture of vincent FALIES
  Performance   Level  

 

Documentation

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


Details

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[1.7] - 2020-01-17

Added

  • Add get videos movie method

[1.6.6] - 2020-01-16

Changed

  • Bug fix: TMdb blocking GET requests with post body

[1.6.5] - 2019-09-28

Changed

Updates for PHP 7.3 compatibility

  • Update Monolog to 2.0
  • Update PHP-CS to 2.15.3
  • Add PHP 7.3 support in Travis & Scrutinizer configuration

Unreleased

Changed

  • Update guzzlehttp/guzzle from 6.3.2 to 6.3.3
  • Update guzzlehttp/guzzle from 6.3.1 to 6.3.2
  • Update PHPUnit version to 7.0+

[1.6.4] - 2018-03-27

Changed

  • Update guzzlehttp/guzzle from 6.3.0 to 6.3.1

[1.6.3] - 2017-12-11

Changed

  • Fix return type if null in result company
  • Add PHP 7.2 support in Travis & Scrutinizer configuration

[1.6.2] - 2017-10-20

Changed

  • Upgrade PHPUnit to version 6.4.x
  • Fix Guzzle call

[1.6.1] - 2017-10-19

Changed

  • Fix PHP Version in composer.json

[1.6.0] - 2017-10-16

Added

  • Add authentification methods
  • Add account methods (favorite, watchlist, rated)
  • Add postRequest & deleteRequest method
  • Add PHP-CS-Fixer tool in composer and git-hook to use PSR-2 standard
  • Add return method types and params types for compatibility PHP 7.1
  • Add tests to check API url
  • Active PHP strict mode

Changed

  • Refactoring code for simplification
  • Correct docblo7cks params
  • Fix API version
  • Refactoring sendRequest method
  • Fix all code in PSR-2 standard
  • Upgrade to PHPUnit 6.2.4
  • Change namespace from vfalies\tmdb to VfacTmdb
  • Fix minor bugs

Removed

  • Remove compatibility PHP 5.6 & 7.0

  Files folder image Files (185)  
File Role Description
Files folder imagesrc (1 directory)
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file .scrutinizer.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file CODE_OF_CONDUCT.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file composer.lock Data Auxiliary data
Accessible without login Plain text file dependencies.yml Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License text
Accessible without login Plain text file Makefile Data Auxiliary data
Accessible without login Plain text file phpunit.xml Data Auxiliary data
Accessible without login Plain text file pre-commit.sh Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:79
This week:0
All time:10,129
This week:53Up