1 | <?php |
||
13 | class Todoist extends AbstractService |
||
14 | { |
||
15 | /* |
||
16 | * Defined scopes, see https://developer.todoist.com/#oauth for definitions. |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | * Grants permission to add tasks to the Inbox project (The application cannot read tasks data). |
||
21 | */ |
||
22 | const SCOPE_TASK_ADD = 'task:add'; |
||
23 | |||
24 | /** |
||
25 | * Grants read-only access to application data, including tasks, projects, labels, and filters. |
||
26 | */ |
||
27 | const SCOPE_DATA_READ = 'data:read'; |
||
28 | |||
29 | /** |
||
30 | * Grants read and write access to application data, including tasks, projects, labels, and filters. |
||
31 | * |
||
32 | * This scope includes task:add and data:read scopes. |
||
33 | */ |
||
34 | const SCOPE_DATA_READ_WRITE = 'data:read_write'; |
||
35 | |||
36 | /** |
||
37 | * Grants permission to delete application data, including tasks, labels, and filters. |
||
38 | */ |
||
39 | const SCOPE_DATA_DELETE = 'data:delete'; |
||
40 | |||
41 | /** |
||
42 | * Grants permission to delete projects. |
||
43 | */ |
||
44 | const SCOPE_PROJECT_DELETE = 'project:delete'; |
||
45 | |||
46 | |||
47 | public function __construct( |
||
61 | |||
62 | /** |
||
63 | * {@inheritdoc} |
||
64 | */ |
||
65 | public function getAuthorizationEndpoint() |
||
69 | |||
70 | /** |
||
71 | * {@inheritdoc} |
||
72 | */ |
||
73 | public function getAccessTokenEndpoint() |
||
77 | |||
78 | /** |
||
79 | * {@inheritdoc} |
||
80 | */ |
||
81 | protected function getAuthorizationMethod() |
||
85 | |||
86 | /** |
||
87 | * {@inheritdoc} |
||
88 | */ |
||
89 | protected function parseAccessTokenResponse($responseBody) |
||
109 | |||
110 | /** |
||
111 | * {@inheritdoc} |
||
112 | */ |
||
113 | protected function getScopesDelimiter() |
||
117 | } |
||
118 |