rewrewby / tvmaze-api
TVMaze-API-Wrapper
dev-master
2016-08-19 13:47 UTC
This package is not auto-updated.
Last update: 2024-09-20 22:07:26 UTC
README
与TVMaze端点交互的一种更简单的方式。使用PHP开发。
通过Composer安装
- composer require joshpinkney/tv-maze-php-api dev-master
目标
- 此API包装器的目标是使TVMaze的端点更加面向对象和可读
- 提供一个简单、开源的项目,任何人都可以贡献
支持的方法及以下完整示例。简单示例在Examples.php中。
<?php require_once "TVMazeIncludes.php"; $Client = new JPinkney\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 seasons for a show given the show ID $Client->TVMaze->getSeasonsByShowID(1); //Return a single seasons information for a show given the show ID and season number $Client->TVMaze->getSeasonByShowID(1, 2); //Return all episodes for a show given the show ID $Client->TVMaze->getEpisodesByShowID(1); //Returns a single episodes information by its show ID, season and episode numbers $Client->TVMaze->getEpisodeByNumber(1, 2, 11); //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); ?>