1 | <?php |
||
27 | class Delicious extends AbstractService |
||
28 | { |
||
29 | public function __construct( |
||
30 | CredentialsInterface $credentials, |
||
31 | ClientInterface $httpClient, |
||
32 | TokenStorageInterface $storage, |
||
33 | $scopes = array(), |
||
34 | UriInterface $baseApiUri = null |
||
35 | ) { |
||
36 | parent::__construct( |
||
37 | $credentials, |
||
38 | $httpClient, |
||
39 | $storage, |
||
40 | $scopes, |
||
41 | $baseApiUri, |
||
42 | true |
||
43 | ); |
||
44 | |||
45 | if (null === $baseApiUri) { |
||
46 | $this->baseApiUri = new Uri('https://api.del.icio.us/v1/'); |
||
47 | } |
||
48 | } |
||
49 | |||
50 | /** |
||
51 | * {@inheritdoc} |
||
52 | */ |
||
53 | public function getAuthorizationEndpoint() |
||
54 | { |
||
55 | return new Uri('https://delicious.com/auth/authorize'); |
||
56 | |||
57 | } |
||
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) |
||
108 | |||
109 | |||
110 | // Special, delicious didn't respect the oauth2 RFC and need a grant_type='code' |
||
111 | /** |
||
112 | * {@inheritdoc} |
||
113 | */ |
||
114 | public function requestAccessToken($code, $state = null) |
||
139 | } |
||
140 |