forked from rewrewby/tvmaze-API
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Examples.php
52 lines (37 loc) · 1.55 KB
/
Examples.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
<?php
/*
* Create a new Client object that will allow us to access all the api's functionality
*/
$client = new Tavy315\TVMaze\TVMazeClient();
/*
* List of some methods that you can use. Others will be included in more formal documentation
*/
$client->search('Arrow');
//Return the most relevant tv show to the given input
$client->singleSearch('The Walking Dead');
//Allows show lookup by using TVRage or TheTVDB ID
$client->getShowBySiteID('TVRage', 33272);
//Return all possible actors relating to the given input
$client->getPersonByName('Nicolas Cage');
//Return all the shows in the given country and/or date
$client->getSchedule();
//Return all information about a show given the show ID
$client->getShowByShowID(1);
//Return all seasons for a show given the show ID
$client->getSeasonsByShowID(1);
//Return a single seasons information for a show given the show ID and season number
$client->getSeasonByShowID(1, 2);
//Return all episodes for a show given the show ID
$client->getEpisodesByShowID(1);
//Returns a single episodes information by its show ID, season and episode numbers
$client->getEpisodeByNumber(1, 2, 11);
//Return the cast for a show given the show ID
$client->getCastByShowID(1);
//Return a master list of TVMazes shows given the page number
$client->getAllShowsByPage(2);
//Return an actor given their ID
$client->getPersonByID(50);
//Return an array of all the shows a particular actor has been in
$client->getCastCreditsByID(25);
//Return an array of all the positions a particular actor has been in
$client->getCrewCreditsByID(100);