Skip to content

Commit

Permalink
Add purchase_url to free bikes and stations
Browse files Browse the repository at this point in the history
Applications consuming GBFS would like to show markers for the available bikes and stations on the map, and when the user taps on these show a link that they can follow to rent that particular bike (for free bikes) or a bike at that particular station (for station-based systems).

Currently, to implement this feature rental URLs need to be hard-coded in the application for each bike/share vendor/deployment.

This patch adds the capability to discover these rental_urls directly from the GBFS feed for each free bike and station.
  • Loading branch information
barbeau committed Apr 27, 2016
1 parent eb35afb commit caed98b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gbfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,7 @@ stations | Yes | Array that contains one object per station i
- is_renting | Yes | 1/0 boolean - is the station currently renting bikes (even if the station is empty, if it is set to allow rentals this value should be 1)
- is_returning | Yes | 1/0 boolean - is the station accepting bike returns (if a station is full but would allow a return if it was not full then this value should be 1)
- last_reported | Yes | Timestamp of the last time this station reported its status to the backend
- purchase_url | Optional | A fully qualified URL, to which the station_id can be passed as a parameter, where a user can rent a bike at this station_id. For example, if a fully qualified URL to a rental webpage for this station is http://app.socialbicycles.com/map?station_id=1219, then the value of purchase_url would be http://app.socialbicycles.com/map, and station_id would be 1219.

### free_bike_status.json
Describes bikes that are not at a station and are not currently in the middle of an active ride.
Expand All @@ -216,6 +217,7 @@ bikes | Yes | Array that contains one object per bike that is
- lon | Yes | Longitude of the bike. The field value must be a valid WGS 84 latitude. See: http://en.wikipedia.org/wiki/World_Geodetic_System
- is_reserved | Yes | 1/0 value - is the bike currently reserved for someone else
- is_disabled | Yes | 1/0 value - is the bike currently disabled (broken)
- purchase_url | Optional | A fully qualified URL, to which the bike_id can be passed as a parameter, where a user can rent this bike_id. For example, if a fully qualified URL to a rental webpage for this bike is http://app.socialbicycles.com/map?bike_id=3503, then the value of purchase_url would be http://app.socialbicycles.com/map, and bike_id would be 3503.

### system_hours.json
Describes the system hours of operation. A JSON array of hours defined as follows:
Expand Down Expand Up @@ -332,4 +334,4 @@ _Apple Pay, PayPass and other third-party product and service names are trademar

## License

Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/).
Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/).

0 comments on commit caed98b

Please sign in to comment.