1 | <?php |
||
17 | class Video |
||
18 | { |
||
19 | /** @var TwitchRequest */ |
||
20 | protected $request; |
||
21 | |||
22 | const URI_VIDEO = 'videos/'; |
||
23 | const URI_VIDEO_TOP = 'videos/top'; |
||
24 | const URI_VIDEO_CHANNEL = 'channels/%s/videos'; |
||
25 | |||
26 | /** |
||
27 | * Video constructor |
||
28 | * @param TwitchRequest $request |
||
29 | */ |
||
30 | public function __construct(TwitchRequest $request) |
||
34 | |||
35 | /** |
||
36 | * Returns a video object |
||
37 | * @see https://github.com/justintv/Twitch-API/blob/master/v3_resources/videos.md#get-videosid |
||
38 | * @param string $id |
||
39 | * @return \stdClass |
||
40 | * @throws TwitchException |
||
41 | */ |
||
42 | public function getVideo($id) |
||
46 | |||
47 | /** |
||
48 | * Returns a list of videos created in a given time period sorted by number of views, most popular first |
||
49 | * @see https://github.com/justintv/Twitch-API/blob/master/v3_resources/videos.md#get-videostop |
||
50 | * @param string $queryString |
||
51 | * @return \stdClass |
||
52 | * @throws TwitchException |
||
53 | */ |
||
54 | public function getTop($queryString) |
||
58 | |||
59 | /** |
||
60 | * Returns a list of videos ordered by time of creation, starting with the most recent from :channel |
||
61 | * @see https://github.com/justintv/Twitch-API/blob/master/v3_resources/videos.md#get-channelschannelvideos |
||
62 | * @param string $channel |
||
63 | * @param string $queryString |
||
64 | * @return \stdClass |
||
65 | * @throws TwitchException |
||
66 | */ |
||
67 | public function getChannelVideos($channel, $queryString) |
||
71 | } |
||
72 |