Skip to content

Instantly share code, notes, and snippets.

@souldeux
Created December 7, 2018 19:16
Show Gist options
  • Save souldeux/cf2e2c15e7e25ea7aa380d33330aaa86 to your computer and use it in GitHub Desktop.
Save souldeux/cf2e2c15e7e25ea7aa380d33330aaa86 to your computer and use it in GitHub Desktop.
>>> endpoint = "https://canary.policyfly.com/coverall/api/v1/applications/1296/"
>>> resp1296 = requests.get(endpoint, headers=auth)
>>> next((obj['v'] for obj in resp1296.json()['Application']['derivedData']['decPage']['responses'] if obj['k'] == 'expirationDate'), None)
'2019-12-31'
>>> endpoint = "https://canary.policyfly.com/coverall/api/v1/applications/1295/"
>>> resp1295 = requests.get(endpoint, headers=auth)
>>> next((obj['v'] for obj in resp1295.json()['Application']['derivedData']['decPage']['responses'] if obj['k'] == 'expirationDate'), None)
'2020-01-01'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment