Last active
April 23, 2018 14:38
-
-
Save sergiolucero/cf3fbc0dc390dc72ff0cdbb25ba5f157 to your computer and use it in GitHub Desktop.
core citybikes gist
This file contains hidden or 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 | |
| base_url = 'http://api.citybik.es' | |
| list_tail = '/v2/networks/?fields=id,name,href' | |
| nets = requests.get(base_url+list_tail).json()['networks'] # retrieves system list | |
| print('FOUND: %d networks' %len(nets)) # 561 last I checked on 20180423 | |
| print(nets[0]) | |
| # {'href': '/v2/networks/bbbike', 'id': 'bbbike', 'name': 'BBBike'} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment