Larson notes. Some changes to templates
This commit is contained in:
@ -4,27 +4,39 @@ import Apikeys
|
||||
apikey = Apikeys.anthology
|
||||
|
||||
groups_to_create = [
|
||||
'Engage', 'Encompass', 'Reach',
|
||||
'Student', 'Learn', 'Baseline', 'Ally',
|
||||
'Milestone','Raise', 'Accreditation',
|
||||
'Program Review', 'Portfolio', 'Outcomes',
|
||||
'Engage-Campus-wide Elections',
|
||||
'Engage-Co-Curricular Paths', 'Engage-ECIA',
|
||||
'Engage-Rooms and Reservations', 'Learn-Bb Reporting',
|
||||
'Learn-A4L']
|
||||
"Engage",
|
||||
"Encompass",
|
||||
"Reach",
|
||||
"Student",
|
||||
"Learn",
|
||||
"Baseline",
|
||||
"Ally",
|
||||
"Milestone",
|
||||
"Raise",
|
||||
"Accreditation",
|
||||
"Program Review",
|
||||
"Portfolio",
|
||||
"Outcomes",
|
||||
"Engage-Campus-wide Elections",
|
||||
"Engage-Co-Curricular Paths",
|
||||
"Engage-ECIA",
|
||||
"Engage-Rooms and Reservations",
|
||||
"Learn-Bb Reporting",
|
||||
"Learn-A4L",
|
||||
]
|
||||
|
||||
url = "https://api.northpass.com/v2/bulk/groups"
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json",
|
||||
"X-Api-Key": apikey,
|
||||
}
|
||||
"accept": "application/json",
|
||||
"content-type": "application/json",
|
||||
"X-Api-Key": apikey,
|
||||
}
|
||||
payload2 = []
|
||||
for group in groups_to_create:
|
||||
payload2.append({"name": group})
|
||||
payload = {"data": {"attributes": {"groups": payload2}}}
|
||||
|
||||
print(payload)
|
||||
# response = requests.post(url, json=payload, headers=headers)
|
||||
# print(response.text)
|
||||
# print(payload)
|
||||
response = requests.post(url, json=payload, headers=headers)
|
||||
print(response.text)
|
||||
# print(response)
|
||||
|
||||
Reference in New Issue
Block a user