-
Notifications
You must be signed in to change notification settings - Fork 0
/
twitch_streamers.php
38 lines (31 loc) · 1021 Bytes
/
twitch_streamers.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
<?php
//////////////////////////
//Config
/////////////////////////
//include config
require('config.php');
//Change streamer url if necessary
$twitchApiUrl = "https://api.twitch.tv/kraken/streams/";
//streamers twitchTV usernames
$streamers = [
'leeleethebunny',
'ryzentv',
'mfsplash',
'mantequillasplay',
'smallung',
'srsbsnstv',
'strifetalk',
'rashaku',
'jetbatsy'
];
////////////////////////////////////
//start App
use srsbsns\Components\FeedReader\FeedToArray;
use srsbsns\Components\Twitch\MergeStreams;
use srsbsns\Components\JsonRepository;
$mergeStreams = new MergeStreams(new FeedToArray());
//Get Data for all streamers in streamers Array and merge them to 1 array
$streamers = $mergeStreams->merge($twitchApiUrl, $streamers);
//save data to Json File
$jsonRepository = new JsonRepository();
$jsonRepository->save('TwitchStreamers', $streamers);