16 lines
387 B
Python
16 lines
387 B
Python
import requests
|
|
import Apikeys
|
|
import pprint
|
|
|
|
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()
|
|
|
|
for item in resp["data"]:
|
|
name = item["attributes"]["title"]
|
|
print(name)
|
|
# pp.pprint(resp)
|