Skip to content

Instantly share code, notes, and snippets.

@sergiolucero
Last active April 23, 2018 14:38
Show Gist options
  • Save sergiolucero/cf3fbc0dc390dc72ff0cdbb25ba5f157 to your computer and use it in GitHub Desktop.
Save sergiolucero/cf3fbc0dc390dc72ff0cdbb25ba5f157 to your computer and use it in GitHub Desktop.
core citybikes gist
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