Updated training events script for SPS commerce. Added some templates for Harri to help Tracy. Small other items.
This commit is contained in:
@ -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