1 | <?php |
||
25 | class Vimeo extends AbstractService |
||
26 | { |
||
27 | // API version |
||
28 | const VERSION = '3.2'; |
||
29 | // API Header Accept |
||
30 | const HEADER_ACCEPT = 'application/vnd.vimeo.*+json;version=3.2'; |
||
31 | |||
32 | /** |
||
33 | * Scopes |
||
34 | * @see https://developer.vimeo.com/api/authentication#scope |
||
35 | */ |
||
36 | // View public videos |
||
37 | const SCOPE_PUBLIC = 'public'; |
||
38 | // View private videos |
||
39 | const SCOPE_PRIVATE = 'private'; |
||
40 | // View Vimeo On Demand purchase history |
||
41 | const SCOPE_PURCHASED = 'purchased'; |
||
42 | // Create new videos, groups, albums, etc. |
||
43 | const SCOPE_CREATE = 'create'; |
||
44 | // Edit videos, groups, albums, etc. |
||
45 | const SCOPE_EDIT = 'edit'; |
||
46 | // Delete videos, groups, albums, etc. |
||
47 | const SCOPE_DELETE = 'delete'; |
||
48 | // Interact with a video on behalf of a user, such as liking |
||
49 | // a video or adding it to your watch later queue |
||
50 | const SCOPE_INTERACT = 'interact'; |
||
51 | // Upload a video |
||
52 | const SCOPE_UPLOAD = 'upload'; |
||
53 | |||
54 | /** |
||
55 | * {@inheritdoc} |
||
56 | */ |
||
57 | protected function init() |
||
65 | |||
66 | /** |
||
67 | * {@inheritdoc} |
||
68 | */ |
||
69 | public function getAuthorizationEndpoint() |
||
73 | |||
74 | /** |
||
75 | * {@inheritdoc} |
||
76 | */ |
||
77 | public function getAccessTokenEndpoint() |
||
81 | |||
82 | /** |
||
83 | * {@inheritdoc} |
||
84 | */ |
||
85 | protected function getAuthorizationMethod() |
||
89 | |||
90 | /** |
||
91 | * {@inheritdoc} |
||
92 | */ |
||
93 | protected function parseAccessTokenResponse($responseBody) |
||
127 | |||
128 | /** |
||
129 | * {@inheritdoc} |
||
130 | */ |
||
131 | protected function getExtraOAuthHeaders() |
||
135 | |||
136 | /** |
||
137 | * {@inheritdoc} |
||
138 | */ |
||
139 | protected function getExtraApiHeaders() |
||
143 | } |
||
144 |