Updated training events script for SPS commerce. Added some templates for Harri to help Tracy. Small other items.
This commit is contained in:
@ -22,3 +22,4 @@ G2 = "JRDpCGQ7vSRiva6t5OkWDr5eJ"
|
||||
DOUGLASELLIMAN = "Bknf8kidbluRfcKu3m3lKoxS8"
|
||||
CIN7 = "51BNlRsLYKQxSu1q1UQq7F63j"
|
||||
FULLSTORY = "ePChrDWLegENa2qnfb259O2Ki"
|
||||
RENAISSANCE = "YFykqX1u0d3HveONc5I9CKnJ1"
|
||||
|
||||
Binary file not shown.
@ -1,7 +1,7 @@
|
||||
import Apikeys
|
||||
import requests
|
||||
|
||||
APIKEY = Apikeys.CIN7
|
||||
APIKEY = Apikeys.RENAISSANCE
|
||||
HEADERS = {
|
||||
"accept": "application/json",
|
||||
"X-Api-Key": APIKEY,
|
||||
@ -51,7 +51,10 @@ def get_courses():
|
||||
nextlink = response["links"]
|
||||
|
||||
for item in response["data"]:
|
||||
print(item["id"])
|
||||
cname = item['attributes']['name']
|
||||
if "[USCS CH MI]" in cname:
|
||||
print(cname)
|
||||
# print(item["id"])
|
||||
# idict = {item["attributes"]["name"]: item["id"]}
|
||||
# id = item["id"]
|
||||
# name = item["attributes"]["name"]
|
||||
|
||||
@ -1,13 +1,15 @@
|
||||
import requests
|
||||
import Apikeys
|
||||
import pprint
|
||||
|
||||
|
||||
apikey = Apikeys.sps
|
||||
url = "https://api.northpass.com/v2/events"
|
||||
headers = {
|
||||
"accept": "application/json",
|
||||
"X-Api-Key": apikey
|
||||
}
|
||||
pp = pprint.PrettyPrinter(indent=4)
|
||||
apikey = Apikeys.SPS
|
||||
url = "https://api.northpass.com/v2/training_events"
|
||||
headers = {"accept": "application/json", "X-Api-Key": apikey}
|
||||
response = requests.get(url, headers=headers)
|
||||
resp = response.json()
|
||||
print(resp)
|
||||
|
||||
for item in resp["data"]:
|
||||
name = item["attributes"]["title"]
|
||||
print(name)
|
||||
# pp.pprint(resp)
|
||||
|
||||
Reference in New Issue
Block a user