Last active
October 4, 2018 19:42
-
-
Save beweinreich/b6e657efdc0f69c4efb6061f8ad7c739 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
headers = {'Content-Type': 'application/json', 'Authorization': 'Bearer REPLACE_ME'} | |
url = 'https://api.density.io/v2/spaces' | |
response = requests.get(url, headers=headers) | |
json_data = response.json() | |
for result in json_data['results']: | |
print('{name}: {current_count}\n').format(name=result['name'], current_count=result['current_count']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment