You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The auth tokens expire every hour. So, the google-calendar script would
stop functioning one hour after start, if it only loads from the token
file.
The get-google-credential script needs to be called directly from the
google-calendar script, without the user needing to run that as a
separate command.
The get-google-credentials script is not a module.
And it uses hyphens in its name, hence it cannot be directly imported
into google-calendar.
To avoid renaming files, and smoothly pass in arguments, runpy is used.
Though google-calendar script is currently the only google service
integration that uses get-google-credentials, the script is not merged
with the google-calendar script, to keep the logic separate, and easy
to expand.
The get-google-credentials script can no longer be run directly, as the
get_credentials() arguments do not have any default values, with the
constants deleted, to avoid redundancy with the google-calendar script.
Updated the function docstrings, usage help and error messages.
Specify your Zulip API credentials and server in a ~/.zuliprc file, or using the options.
36
37
37
-
Before running this integration, make sure you download the client secret file from Google, and run the get-google-credentials script to give Zulip read access to your Google Calendar.
38
-
39
38
This integration should be run on your local machine, as your API key is accessible to local users through the command line.
40
39
41
40
For more information, see https://zulip.com/integrations/doc/google-calendar.
@@ -78,23 +77,17 @@ if options.verbose:
78
77
79
78
80
79
defget_credentials() ->Credentials:
81
-
"""Gets valid user credentials from storage.
82
-
83
-
If nothing has been stored, or if the stored credentials are invalid,
84
-
an exception is thrown and the user is informed to run the script in this directory to get
85
-
credentials.
80
+
"""Fetches credentials using the get-google-credentials script.
86
81
87
-
Returns:
88
-
Credentials, the obtained credential.
82
+
Needs to call get-google-credentials everytime, because the auth token expires every hour,
0 commit comments