forked from Decicus/DecAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathweb.php
254 lines (192 loc) · 11 KB
/
web.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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<?php
/*
|--------------------------------------------------------------------------
| Routes File
|--------------------------------------------------------------------------
|
| Here is where you will register all of the routes in an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/
Route::get('/{index?}', ['as' => 'home', 'uses' => 'GeneralController@home'])
->where('index', '(index(.php)?|home)');
Route::group(['prefix' => 'askfm'], function() {
Route::get('rss/{user?}', 'AskfmController@rss');
});
Route::group(['prefix' => 'auth', 'as' => 'auth.'], function() {
Route::group(['prefix' => 'twitch', 'as' => 'twitch.'], function() {
Route::get('/', ['as' => 'base', 'uses' => 'TwitchAuthController@redirect']);
Route::get('callback', ['as' => 'callback', 'uses' => 'TwitchAuthController@callback']);
Route::get('logout', ['as' => 'logout', 'uses' => 'TwitchAuthController@logout']);
});
});
Route::group(['prefix' => 'br', 'as' => 'br.'], function() {
Route::group(['prefix' => 'player', 'as' => 'player.'], function() {
Route::get('{id}/{type?}', ['as' => 'summary', 'uses' => 'BattleRoyaleController@player'])
->where('id', '([A-z0-9]+)')
->where('type', '(.*+)');
});
});
Route::group(['prefix' => 'bttv', 'as' => 'bttv.'], function() {
Route::get('/', ['as' => 'home', 'uses' => 'BttvController@home']);
Route::get('{emotes}/{channel?}', ['as' => 'emotes', 'uses' => 'BttvController@emotes'])
->where('emotes', '(emotes(\.php)?)')
->where('channel', '([A-z0-9]{1,30})');
});
Route::group(['prefix' => 'dayz', 'as' => 'dayz.'], function() {
Route::get('/', ['as' => 'base', 'uses' => 'DayZController@base']);
Route::get('players', ['as' => 'players', 'uses' => 'DayZController@players']);
Route::get('izurvive', ['as' => 'izurvive', 'uses' => 'DayZController@izurvive']);
Route::get('random-server', ['as' => 'randomServer', 'uses' => 'DayZController@randomServer']);
Route::get('status-report', ['as' => 'statusReport', 'uses' => 'DayZController@statusReport']);
Route::get('steam-status-report', ['as' => 'steamStatusReport', 'uses' => 'DayZController@steamStatusReport']);
});
Route::group(['prefix' => 'ffz', 'as' => 'ffz.'], function() {
Route::get('emotes/{channel?}', ['as' => 'emotes', 'uses' => 'FfzController@emotes'])
->where('channel', '.*');
});
Route::group(['prefix' => 'lever', 'as' => 'lever.'], function() {
Route::get('/', ['as' => 'base', 'uses' => 'LeverController@base']);
Route::get('{twitch}', ['as' => 'twitch', 'uses' => 'LeverController@twitch'])
->where('twitch', '(twitch(\.php)?)');
});
Route::group(['prefix' => 'math', 'as' => 'math.'], function() {
Route::get('/', ['as' => 'evaluate', 'uses' => 'MathController@evaluate']);
});
Route::group(['prefix' => 'misc', 'as' => 'misc.'], function() {
Route::get('{currency}', ['as' => 'currency', 'uses' => 'MiscController@currency'])
->where('currency', '(currency(\.php)?)');
Route::get('{time}', ['as' => 'time', 'uses' => 'MiscController@time'])
->where('time', '(time(\.php)?)');
Route::get('timezones', ['as' => 'timezones', 'uses' => 'MiscController@timezones']);
});
Route::group(['prefix' => 'random', 'as' => 'random.'], function() {
Route::get('{number}/{min?}/{max?}', ['as' => 'number', 'uses' => 'RandomController@number'])
->where('number', '(num(ber)?)')
->where('min', '((-)?[\d]+)')
->where('max', '((-)?[\d]+)');
});
Route::group(['prefix' => 'steam', 'as' => 'steam.', 'middleware' => 'ratelimit:' . env('STEAM_THROTTLE_RATE_LIMIT', '15,1')], function() {
Route::get('connect/{appId?}/{parameters?}', ['as' => 'connect', 'uses' => 'SteamController@connect'])
->where('appId', '[\d]{1,8}')
->where('parameters', '.*');
Route::get('currencies', ['as' => 'currencies', 'uses' => 'SteamController@listCurrencies']);
Route::get('gamesearch', ['as' => 'gamesearch', 'uses' => 'SteamController@gameInfoBySearch']);
Route::get('{hours}/{player_id?}/{app_id?}/{readable?}', ['as' => 'hours', 'uses' => 'SteamController@hours'])
->where('hours', '(hours(\.php)?)')
->where('player_id', '([A-z:0-9]+)')
->where('app_id', '([0-9]+)')
->where('readable', 'readable');
Route::get('{server_ip}/{id?}', ['as' => 'server_ip', 'uses' => 'SteamController@serverIp'])
->where('server_ip', '(server_ip(.php)?)')
->where('id', '([A-z:0-9]+)');
});
Route::group(['prefix' => 'twitch', 'as' => 'twitch.', 'middleware' => 'ratelimit:' . env('THROTTLE_RATE_LIMIT', '100,1')], function() {
// Include some extra characters that are used in examples quite often.
// The error returned should hopefully clear up any confusion as to why it doesn't work.
$channelRegex = '([$:{}A-z0-9]{1,50})';
Route::get('/', 'TwitchController@base');
Route::get('accountage/{user?}', 'TwitchController@accountAge')
->where('user', $channelRegex);
Route::get('avatar/{user?}', 'TwitchController@avatar');
Route::group(['prefix' => 'blog', 'as' => 'blog.'], function() {
Route::get('latest', ['as' => 'latest', 'uses' => 'TwitchBlogController@latest']);
});
Route::get('chat_rules/{channel?}', ['as' => 'chat_rules', 'uses' => 'TwitchController@chatRules'])
->where('channel', $channelRegex);
Route::get('clusters/{channel?}', 'TwitchController@clusters')
->where('channel', $channelRegex);
Route::get('{creation}/{channel?}', 'TwitchController@creation')
->where('creation', '(creation(\.php)?)')
->where('channel', $channelRegex);
Route::get('emoteslots/{channel?}', 'TwitchController@emoteslots')
->where('channel', $channelRegex);
Route::get('followage/{channel?}/{user?}', 'TwitchController@followAge')
->where('channel', $channelRegex)
->where('user', $channelRegex);
Route::get('followcount/{channel?}', 'TwitchController@followCount')
->where('channel', $channelRegex);
Route::get('{followed}/{channel?}/{user?}', 'TwitchController@followed')
->where('followed', '(followed(\.php)?)')
->where('channel', $channelRegex)
->where('user', $channelRegex);
Route::get('{followers}/{channel?}', 'TwitchController@followers')
->where('followers', '(followers(\.php)?)')
->where('channel', $channelRegex);
Route::get('following/{user?}', 'TwitchController@following')
->where('user', $channelRegex);
Route::get('{gameOrStatus}/{channel?}', 'TwitchController@gameOrStatus')
->where('gameOrStatus', '(game|status|title)')
->where('channel', $channelRegex);
Route::get('help/{search?}', ['as' => 'help', 'uses' => 'TwitchController@help'])
->where('search', '.*');
Route::get('{highlight}/{channel?}', 'TwitchController@highlight')
->where('highlight', '(highlight(\.php)?)')
->where('channel', $channelRegex);
Route::get('{highlight_random}/{channel?}', ['as' => 'highlight_random', 'uses' => 'TwitchController@highlightRandom'])
->where('highlight_random', '(highlight_random(\.php)?)')
->where('channel', $channelRegex);
Route::get('{hosts}/{channel?}', 'TwitchController@hosts')
->where('hosts', '(hosts(\.php)?)')
->where('channel', $channelRegex);
Route::get('hostscount/{channel?}', 'TwitchController@hostscount')
->where('channel', $channelRegex);
Route::get('id/{user?}', ['as' => 'id', 'uses' => 'TwitchController@id'])
->where('user', $channelRegex);
Route::get('{ingests}', 'TwitchController@ingests')
->where('ingests', '(ingests(\.php)?)');
Route::get('multi/{streams?}', ['as' => 'multi', 'uses' => 'TwitchController@multi'])
->where('streams', '([A-z0-9_\s])+');
Route::get('random_sub/{channel?}', ['as' => 'random_sub', 'uses' => 'TwitchController@subList', 'action' => 'random'])
->where('channel', $channelRegex);
Route::get('latest_sub/{channel?}', ['as' => 'latest_sub', 'uses' => 'TwitchController@subList', 'action' => 'latest'])
->where('channel', $channelRegex);
Route::get('random_user/{channel?}', ['as' => 'random_viewer', 'uses' => 'TwitchController@randomUser'])
->where('channel', $channelRegex);
Route::get('subage/{channel?}/{user?}', ['as' => 'subage', 'uses' => 'TwitchController@subAge'])
->where('channel', $channelRegex)
->where('user', $channelRegex);
Route::get('{subcount}/{channel?}', ['as' => 'subcount', 'uses' => 'TwitchController@subcount'])
->where('subcount', '(subcount(\.php)?)')
->where('channel', $channelRegex);
Route::get('subpoints/{channel?}', ['as' => 'subpoints', 'uses' => 'TwitchController@subpoints'])
->where('channel', $channelRegex);
Route::get('subscriber_emotes/{channel?}', 'TwitchController@subEmotes')
->where('channel', $channelRegex);
Route::get('{team_members}/{team?}', 'TwitchController@teamMembers')
->where('team_members', '(team_members(\.php)?)')
->where('team', '([A-z0-9]{1,40})');
Route::get('total_views/{channel?}', 'TwitchController@totalViews')
->where('channel', $channelRegex);
Route::get('upload/{channel?}', 'TwitchController@upload')
->where('channel', $channelRegex);
Route::get('{uptime}/{channel?}', 'TwitchController@uptime')
->where('uptime', '(uptime(\.php)?)')
->where('channel', '([A-z0-9]){1,25}');
Route::get('viewercount/{channel?}', 'TwitchController@viewercount')
->where('channel', $channelRegex);
Route::get('videos/{channel?}', 'TwitchController@videos')
->where('channel', $channelRegex);
Route::get('vod_replay/{channel?}', 'TwitchController@vodReplay')
->where('channel', $channelRegex);
});
Route::group(['prefix' => 'twitter', 'as' => 'twitter.'], function() {
Route::get('accountage/{name?}', ['as' => 'accountage', 'uses' => 'TwitterController@accountage']);
Route::get('{latest}/{name?}', ['as' => 'latest', 'uses' => 'TwitterController@latest'])
->where('latest', '(latest(\.php)?|latest_url(\.php)?|latest_id(\.php)?)')
->where('name', '([A-z0-9]+)');
Route::get('{tweet}/{name?}', ['as' => 'tweet', 'uses' => 'TwitterController@tweet'])
->where('tweet', '(tweet(\.php)?)')
->where('name', '([A-z0-9]+)');
});
Route::group(['prefix' => 'youtube', 'as' => 'youtube'], function() {
Route::get('{latest_video}', ['as' => 'latest_video', 'uses' => 'YouTubeController@latestVideo'])
->where('latest_video', '(latest_video(\.php)?)');
Route::get('latest_pl_video', ['as' => 'latest_pl_video', 'uses' => 'YouTubeController@latestPlVideo']);
Route::get('{videoid}/{search?}', ['as' => 'videoid', 'uses' => 'YouTubeController@videoId'])
->where('videoid', '(videoid(\.php)?)')
->where('search', '(.*+)');
});
Route::any('{fallback}', ['as' => 'fallback', 'uses' => 'GeneralController@fallback'])
->where('fallback', '.*');