|
|
|
@ -1,3 +1,4 @@ |
|
|
|
import os |
|
|
|
from dateutil import rrule, tz |
|
|
|
from oauth2client import tools |
|
|
|
from googleapiclient.errors import HttpError |
|
|
|
@ -10,7 +11,7 @@ import datetime |
|
|
|
if __name__ == "__main__": |
|
|
|
from api import API |
|
|
|
else: |
|
|
|
from gapi.api import API |
|
|
|
from gapi.api import API, config |
|
|
|
|
|
|
|
flags = argparse.ArgumentParser(parents=[tools.argparser]).parse_args() |
|
|
|
APPLICATION_NAME = "Google Calendar API Python" |
|
|
|
@ -45,8 +46,8 @@ class calendar_api(API): |
|
|
|
def __init__( |
|
|
|
self, |
|
|
|
app_name, |
|
|
|
client_secret_file, |
|
|
|
credentials_dir, |
|
|
|
client_secret_file=os.path.join(config.state_dir, "client_secret.json"), |
|
|
|
credentials_dir=config.state_dir, |
|
|
|
scopes="https://www.googleapis.com/auth/calendar", |
|
|
|
version="v3", |
|
|
|
): |
|
|
|
|