| @@ 38-50 (lines=13) @@ | ||
| 35 | ||
| 36 | class ServicePushbullet(ServicesMgr): |
|
| 37 | ||
| 38 | def __init__(self, token=None, **kwargs): |
|
| 39 | super(ServicePushbullet, self).__init__(token, **kwargs) |
|
| 40 | self.AUTH_URL = 'https://pushbullet.com/authorize' |
|
| 41 | self.ACC_TOKEN = 'https://pushbullet.com/access_token' |
|
| 42 | self.REQ_TOKEN = 'https://api.pushbullet.com/oauth2/token' |
|
| 43 | self.consumer_key = settings.TH_PUSHBULLET['client_id'] |
|
| 44 | self.consumer_secret = settings.TH_PUSHBULLET['client_secret'] |
|
| 45 | self.scope = 'everything' |
|
| 46 | self.service = 'ServicePushbullet' |
|
| 47 | self.oauth = 'oauth2' |
|
| 48 | if token: |
|
| 49 | self.token = token |
|
| 50 | self.pushb = Pushb(token) |
|
| 51 | ||
| 52 | def read_data(self, **kwargs): |
|
| 53 | """ |
|
| @@ 37-49 (lines=13) @@ | ||
| 34 | ||
| 35 | class ServiceTodoist(ServicesMgr): |
|
| 36 | ||
| 37 | def __init__(self, token=None, **kwargs): |
|
| 38 | super(ServiceTodoist, self).__init__(token, **kwargs) |
|
| 39 | self.AUTH_URL = 'https://todoist.com/oauth/authorize' |
|
| 40 | self.ACC_TOKEN = 'https://todoist.com/oauth/access_token' |
|
| 41 | self.REQ_TOKEN = 'https://todoist.com/oauth/access_token' |
|
| 42 | self.consumer_key = settings.TH_TODOIST['client_id'] |
|
| 43 | self.consumer_secret = settings.TH_TODOIST['client_secret'] |
|
| 44 | self.scope = 'task:add,data:read,data:read_write' |
|
| 45 | self.service = 'ServiceTodoist' |
|
| 46 | self.oauth = 'oauth2' |
|
| 47 | if token: |
|
| 48 | self.token = token |
|
| 49 | self.todoist = TodoistAPI(token) |
|
| 50 | ||
| 51 | def read_data(self, **kwargs): |
|
| 52 | """ |
|