PHP code example of dariusiii / tv-maze-php-api
1. Go to this page and download the library: Download dariusiii/tv-maze-php-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dariusiii / tv-maze-php-api example snippets
nt = new DariusIII\TVMaze\Client;
/*
* List of simple ways you can interact with the api
*/
//Return all tv shows relating to the given input
$Client->TVMaze->search("Arrow");
//Return the most relevant tv show to the given input
$Client->TVMaze->singleSearch("The Walking Dead");
//Allows show lookup by using TVRage or TheTVDB ID
$Client->TVMaze->getShowBySiteID("TVRage", 33272);
//Return all possible actors relating to the given input
$Client->TVMaze->getPersonByName("Nicolas Cage");
//Return all the shows in the given country and/or date
$Client->TVMaze->getSchedule();
//Return all information about a show given the show ID
$Client->TVMaze->getShowByShowID(1);
//Return all episodes for a show given the show ID
$Client->TVMaze->getEpisodesByShowID(1);
//Return the cast for a show given the show ID
$Client->TVMaze->getCastByShowID(1);
//Return a master list of TVMazes shows given the page number
$Client->TVMaze->getAllShowsByPage(2);
//Return an actor given their ID
$Client->TVMaze->getPersonByID(50);
//Return an array of all the shows a particular actor has been in
$Client->TVMaze->getCastCreditsByID(25);
//Return an array of all the positions a particular actor has been in
$Client->TVMaze->getCrewCreditsByID(100);