1 | <?php |
||
14 | class DeviantArt extends AbstractService |
||
15 | { |
||
16 | /** |
||
17 | * DeviantArt www url - used to build dialog urls |
||
18 | */ |
||
19 | const WWW_URL = 'https://www.deviantart.com/'; |
||
20 | |||
21 | /** |
||
22 | * Defined scopes |
||
23 | * |
||
24 | * If you don't think this is scary you should not be allowed on the web at all |
||
25 | * |
||
26 | * @link https://www.deviantart.com/developers/authentication |
||
27 | * @link https://www.deviantart.com/developers/http/v1/20150217 |
||
28 | */ |
||
29 | const SCOPE_FEED = 'feed'; |
||
30 | const SCOPE_BROWSE = 'browse'; |
||
31 | const SCOPE_COMMENT = 'comment.post'; |
||
32 | const SCOPE_STASH = 'stash'; |
||
33 | const SCOPE_USER = 'user'; |
||
34 | const SCOPE_USERMANAGE = 'user.manage'; |
||
35 | |||
36 | public function __construct( |
||
37 | CredentialsInterface $credentials, |
||
38 | ClientInterface $httpClient, |
||
39 | TokenStorageInterface $storage, |
||
40 | $scopes = array(), |
||
41 | UriInterface $baseApiUri = null |
||
42 | ) { |
||
43 | parent::__construct($credentials, $httpClient, $storage, $scopes, $baseApiUri); |
||
44 | |||
45 | if (null === $baseApiUri) { |
||
46 | $this->baseApiUri = new Uri('https://www.deviantart.com/api/v1/oauth2/'); |
||
47 | } |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function getAuthorizationEndpoint() |
||
57 | |||
58 | /** |
||
59 | * {@inheritdoc} |
||
60 | */ |
||
61 | public function getAccessTokenEndpoint() |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | protected function parseAccessTokenResponse($responseBody) |
||
99 | } |
||
100 |