changeset 33:0d4b481f5bd3

add write access to make events
author drewp@bigasterisk.com
date Wed, 16 Aug 2023 18:13:45 -0700
parents 8ee60e02219d
children 281e4b12dd37
files .hgignore calendar_connection.py login.py
diffstat 3 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgignore	Sat Jul 08 21:54:48 2023 -0700
+++ b/.hgignore	Wed Aug 16 18:13:45 2023 -0700
@@ -2,4 +2,5 @@
 __pycache__
 __pypackages__
 .pdm-python
-credentials
\ No newline at end of file
+credentials
+node_modules
--- a/calendar_connection.py	Sat Jul 08 21:54:48 2023 -0700
+++ b/calendar_connection.py	Wed Aug 16 18:13:45 2023 -0700
@@ -5,10 +5,8 @@
 from google_auth_oauthlib.flow import InstalledAppFlow
 from googleapiclient.discovery import build, Resource
 
-SCOPES = ['https://www.googleapis.com/auth/calendar.readonly']
 
-
-def getCalendarService(scope='https://www.googleapis.com/auth/calendar.readonly') -> Resource:
+def getCalendarService(scope='https://www.googleapis.com/auth/calendar.events') -> Resource:
     """
     """
     creds = None
--- a/login.py	Sat Jul 08 21:54:48 2023 -0700
+++ b/login.py	Wed Aug 16 18:13:45 2023 -0700
@@ -1,8 +1,10 @@
 """run this to update auth files, the rebuild docker"""
 
-from standardservice.logsetup import log, verboseLogging
+import logging
 
 from calendar_connection import getCalendarService
 
-verboseLogging(True)
-log.info(f'res={getCalendarService()}')
\ No newline at end of file
+logging.basicConfig(level=logging.DEBUG)
+log = logging.getLogger()
+
+log.info(f'res={getCalendarService()}')