Skip to content

slvler/tmdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TMDB service

tests Latest Stable Version Latest Unstable Version License Total Downloads

An api service for tmdb.com

Installation

To install this package tou can use composer:

composer require slvler/tmdb

Usage

  • first step is to start client client with required url, version, api key
$option['base_url'] = 'https://api.themoviedb.org/3/'
$option['api_key'] = 'xxxx'
$option['version'] = '3'

$client = new Client($option);
  • You need to make a request to the tmdb service with the service point we created.
$tmdb = new Tmdb($client);
  • Then you can send a request like this to bring the information of the movie we want.
$tmdb->movie("550");
  • You can it to fetch player information.
$tmdb->people("13");
  • to search on the specified keyword
$tmdb->keyword("550");
  • to search in the specified condition
$tmdb->network("550");
  • You can it to search in specified situations.
$tmdb->review("58aa82f09251416f92006a3a");
  • You want this service when you want a TV program.
$tmdb->tv("111");
  • movies with collection
$tmdb->collection("10");

Testing

vendor\bin\phpunit

Credits

License

The MIT License (MIT). Please see License File for more information.