1 | <?php |
||
13 | class Reddit extends AbstractService |
||
14 | { |
||
15 | /** |
||
16 | * Defined scopes |
||
17 | * |
||
18 | * @link http://www.reddit.com/dev/api/oauth |
||
19 | */ |
||
20 | // User scopes |
||
21 | const SCOPE_EDIT = 'edit'; |
||
22 | const SCOPE_HISTORY = 'history'; |
||
23 | const SCOPE_IDENTITY = 'identity'; |
||
24 | const SCOPE_MYSUBREDDITS = 'mysubreddits'; |
||
25 | const SCOPE_PRIVATEMESSAGES = 'privatemessages'; |
||
26 | const SCOPE_READ = 'read'; |
||
27 | const SCOPE_SAVE = 'save'; |
||
28 | const SCOPE_SUBMIT = 'submit'; |
||
29 | const SCOPE_SUBSCRIBE = 'subscribe'; |
||
30 | const SCOPE_VOTE = 'vote'; |
||
31 | // Mod Scopes |
||
32 | const SCOPE_MODCONFIG = 'modconfig'; |
||
33 | const SCOPE_MODFLAIR = 'modflair'; |
||
34 | const SCOPE_MODLOG = 'modlog'; |
||
35 | const SCOPE_MODPOST = 'modpost'; |
||
36 | |||
37 | public function __construct( |
||
50 | |||
51 | /** |
||
52 | * {@inheritdoc} |
||
53 | */ |
||
54 | public function getAuthorizationEndpoint() |
||
58 | |||
59 | /** |
||
60 | * {@inheritdoc} |
||
61 | */ |
||
62 | public function getAccessTokenEndpoint() |
||
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | protected function getAuthorizationMethod() |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | protected function parseAccessTokenResponse($responseBody) |
||
104 | |||
105 | /** |
||
106 | * {@inheritdoc} |
||
107 | */ |
||
108 | protected function getExtraOAuthHeaders() |
||
114 | } |
||
115 |