1 | <?php |
||
9 | class Reddit extends AbstractService |
||
10 | { |
||
11 | /** |
||
12 | * Defined scopes |
||
13 | * |
||
14 | * @link http://www.reddit.com/dev/api/oauth |
||
15 | */ |
||
16 | // User scopes |
||
17 | const SCOPE_EDIT = 'edit'; |
||
18 | const SCOPE_HISTORY = 'history'; |
||
19 | const SCOPE_IDENTITY = 'identity'; |
||
20 | const SCOPE_MYSUBREDDITS = 'mysubreddits'; |
||
21 | const SCOPE_PRIVATEMESSAGES = 'privatemessages'; |
||
22 | const SCOPE_READ = 'read'; |
||
23 | const SCOPE_SAVE = 'save'; |
||
24 | const SCOPE_SUBMIT = 'submit'; |
||
25 | const SCOPE_SUBSCRIBE = 'subscribe'; |
||
26 | const SCOPE_VOTE = 'vote'; |
||
27 | // Mod Scopes |
||
28 | const SCOPE_MODCONFIG = 'modconfig'; |
||
29 | const SCOPE_MODFLAIR = 'modflair'; |
||
30 | const SCOPE_MODLOG = 'modlog'; |
||
31 | const SCOPE_MODPOST = 'modpost'; |
||
32 | |||
33 | /** |
||
34 | * {@inheritdoc} |
||
35 | */ |
||
36 | protected function init() |
||
44 | |||
45 | /** |
||
46 | * {@inheritdoc} |
||
47 | */ |
||
48 | public function getAuthorizationEndpoint() |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function getAccessTokenEndpoint() |
||
60 | |||
61 | /** |
||
62 | * {@inheritdoc} |
||
63 | */ |
||
64 | protected function getAuthorizationMethod() |
||
68 | |||
69 | /** |
||
70 | * {@inheritdoc} |
||
71 | */ |
||
72 | protected function parseAccessTokenResponse($responseBody) |
||
98 | |||
99 | /** |
||
100 | * {@inheritdoc} |
||
101 | */ |
||
102 | protected function getExtraOAuthHeaders() |
||
108 | } |
||
109 |