-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuserFunctions.py
More file actions
37 lines (30 loc) · 1015 Bytes
/
userFunctions.py
File metadata and controls
37 lines (30 loc) · 1015 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
import sys
import jwt
import http.client
import datetime
import json
# Go to
# Then get API Key, API Secret and insert below
api_key = 'p-zpPVCrQMy4SnOlAV9BGw'
api_sec = '8NWGe7uCQd8574r8EKpZJi3nrNRm3UPezoY7'
payload = {
'iss':api_key,
'exp': datetime.datetime.now() + datetime.timedelta(hours=2)
}
jwt_encoded = str(jwt.encode(payload, api_sec), 'utf-8')
conn = http.client.HTTPSConnection("api.zoom.us")
headers = {
'authorization': "Bearer %s" % jwt_encoded,
'content-type': "application/json"
}
def displayMeetings(user_id):
#retrieve list of meeting ids
for id in meeting_ids:
conn.request("GET", "/v2/meetings/" + str(response_obj[id]) + "/invitation", headers=headers)
res = conn.getresponse()
response_string = res.read().decode('utf-8')
response_obj = json.loads(response_string)
# check if date has passed then move to past meetings
# display on page
def removeMeeting(user_id, meeting_id):
pass