Skip to content

Commit 700f7f4

Browse files
committed
Minor cleanup
1 parent 8602607 commit 700f7f4

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

MagTag_Google_Calendar/code.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,11 @@
5757
r = rtc.RTC()
5858

5959
magtag.network.connect()
60-
requests = magtag.network.requests
6160

6261
# Initialize an OAuth2 object with GCal API scope
6362
scopes = ["https://www.googleapis.com/auth/calendar.readonly"]
6463
google_auth = OAuth2(
65-
requests,
64+
magtag.network.requests,
6665
secrets["google_client_id"],
6766
secrets["google_client_secret"],
6867
scopes,
@@ -121,7 +120,7 @@ def get_calendar_events(calendar_id, max_events, time_min):
121120
"/events?maxResults={1}&timeMin={2}&timeMax={3}&orderBy=startTime"
122121
"&singleEvents=true".format(calendar_id, max_events, time_min, time_max)
123122
)
124-
resp = requests.get(url, headers=headers)
123+
resp = magtag.network.requests.get(url, headers=headers)
125124
resp_json = resp.json()
126125
if "error" in resp_json:
127126
raise RuntimeError("Error:", resp_json)

0 commit comments

Comments
 (0)