1 | <?php |
||
5 | class UrlNormalizer |
||
6 | { |
||
7 | protected static $specialUrls = [ |
||
8 | 'i/activity/about_me' => |
||
9 | 'https://api.twitter.com/i/activity/about_me.json', |
||
10 | 'i/activity/by_friends' => |
||
11 | 'https://api.twitter.com/i/activity/by_friends.json', |
||
12 | 'site' => |
||
13 | 'https://sitestream.twitter.com/1.1/site.json', |
||
14 | 'statuses/filter' => |
||
15 | 'https://stream.twitter.com/1.1/statuses/filter.json', |
||
16 | 'statuses/firehose' => |
||
17 | 'https://stream.twitter.com/1.1/statuses/firehose.json', |
||
18 | 'statuses/sample' => |
||
19 | 'https://stream.twitter.com/1.1/statuses/sample.json', |
||
20 | 'media/upload' => |
||
21 | 'https://upload.twitter.com/1.1/media/upload.json', |
||
22 | 'user' => |
||
23 | 'https://userstream.twitter.com/1.1/user.json', |
||
24 | ]; |
||
25 | |||
26 | protected static $versions = ['1.1' => true, '1' => true, 'i' => true]; |
||
27 | |||
28 | 2 | protected static function twitterFixPathSegments(array $segments) |
|
41 | |||
42 | 3 | protected static function twitterBuildUrl(array $e, array $segments) |
|
52 | |||
53 | 4 | public static function twitterSplitUrlAndParameters($endpoint) |
|
68 | |||
69 | 3 | protected static function outBuildUrl(array $e, array $segments) |
|
83 | |||
84 | 4 | public static function outSplitUrlAndParameters($endpoint) |
|
93 | } |
||
94 |