honestly not sure what I changed sorry
This commit is contained in:
parent
2cfafc0c2e
commit
64df1f12a4
@ -10,6 +10,8 @@ def apiGetRequest(api_base, endpoint, params, headers):
|
|||||||
|
|
||||||
if resp.status_code == 200:
|
if resp.status_code == 200:
|
||||||
return resp.json()
|
return resp.json()
|
||||||
|
else:
|
||||||
|
resp.raise_for_status()
|
||||||
|
|
||||||
api_base = os.environ["API_BASE"]
|
api_base = os.environ["API_BASE"]
|
||||||
authToken = os.environ["AUTH_TOKEN"]
|
authToken = os.environ["AUTH_TOKEN"]
|
||||||
@ -24,5 +26,5 @@ for item in data: #This is just iterating through whatever comes back and barfin
|
|||||||
print(f"{item['companyName']} - {item['name']} - {item['agreementStatus']}")
|
print(f"{item['companyName']} - {item['name']} - {item['agreementStatus']}")
|
||||||
additionsEndpoint = '/finance/agreements/' + str(item['id']) + '/additions'
|
additionsEndpoint = '/finance/agreements/' + str(item['id']) + '/additions'
|
||||||
additions = apiGetRequest(api_base, additionsEndpoint, {'pagesize': 50}, headers)
|
additions = apiGetRequest(api_base, additionsEndpoint, {'pagesize': 50}, headers)
|
||||||
for thing in additions:
|
for thing in additions: # Yo dawg I heard you like loops
|
||||||
print(' ' + thing['product']['identifier'])
|
print(' ' + thing['product']['identifier'])
|
||||||
|
Loading…
Reference in New Issue
Block a user