/tmdb

TMDB.com api service for php

Primary LanguagePHPMIT LicenseMIT

Slvler - TMDB service

tests Latest Stable Version Latest Unstable Version License

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/",
            'api_key' => "xxxx",
            '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.