Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jtyr/londonbikes
Script which allows to search in the TFL BikePoint API.
https://github.com/jtyr/londonbikes
api bike bikepoint london tfl
Last synced: 19 days ago
JSON representation
Script which allows to search in the TFL BikePoint API.
- Host: GitHub
- URL: https://github.com/jtyr/londonbikes
- Owner: jtyr
- License: mit
- Created: 2020-03-13T01:44:02.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-03-13T02:23:00.000Z (over 4 years ago)
- Last Synced: 2024-10-11T17:06:21.718Z (about 1 month ago)
- Topics: api, bike, bikepoint, london, tfl
- Language: Python
- Size: 3.91 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
londonbikes
===========Simple script which allows to search in the TFL BikePoint API.
Instalation
-----------```shell
python setup.py install --user
```Usage
-----The script requires Application ID and Key from [TFL
API](https://api.tfl.gov.uk). Once you have them, export those as environment
variables:```shell
export TFL_APP_ID='abcdefgh'
export TFL_APP_KEY='1234567890abcdefghijklmnopqrstuv'
```The usage of the script is:
```
$ londonbikes
Usage:
londonbikes search
londonbikes search
londonbikes id
```You can search for BikePoints:
```
$ londonbikes search East
Id Name Latitude Longitude
BikePoints_50 East Road, Hoxton 51.528673 -0.087459
BikePoints_233 Pall Mall East, West End 51.50777 -0.130699
BikePoints_330 Eastbourne Mews, Paddington 51.516417 -0.179135
[...]
```Or search for BikePoints in certain distance from a specific location:
```
$ londonbikes search 51.53 -0.09 250
Id Name Latitude,Longitude Distance
Id Name Latitude,Longitude Distance
BikePoints_63 Murray Grove , Hoxton 51.53089,-0.089782 100.1
BikePoints_50 East Road, Hoxton 51.528673,-0.087459 229.5
```Or display information about a specific BikePoint:
```
$ londonbikes id BikePoints_50
Name Latitude Longitude Num Bikes Empty Docks
East Road, Hoxton 51.528673 -0.087459 24 3
```Debug messages will be shown if the following environment variable is exported:
```shell
export LONDONBIKES_DEBUG='1'
```Author
------Jiri Tyr
License
-------MIT