added comments
This commit is contained in:
parent
260e44abcd
commit
e044a62ec9
3
main.py
3
main.py
@ -26,15 +26,18 @@ user_location_db = UserLocation()
|
||||
task_completed_db = TaskCompleted()
|
||||
TZ = datetime.datetime.now().astimezone().tzinfo
|
||||
|
||||
#ici avec le token google et les permissions utilisés, on appel le service agenda de google
|
||||
def build_calendar_service():
|
||||
creds = Credentials.from_authorized_user_file(TOKEN_FILE, SCOPES)
|
||||
return build('calendar', 'v3', credentials=creds)
|
||||
|
||||
#idem mais avec google tâches
|
||||
def build_tasks_service():
|
||||
creds = Credentials.from_authorized_user_file(TOKEN_FILE, SCOPES)
|
||||
service = build('tasks', 'v1', credentials=creds)
|
||||
return service
|
||||
|
||||
#ici l'horaire récupéré par l'API est formatter pour qu'il soit plus lisible
|
||||
def parse_rfc3339_to_local_date(ts):
|
||||
if not ts:
|
||||
return None
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user