Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion models/rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "gbfs_types"
version = "0.1.4"
version = "0.1.5"
edition = "2021"
license = "Apache-2.0"
description = "Types for GBFS"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"bikes": [
{
"bike_id": "973a5c94-c288-4a2b-afa6-de8aeb6ae2e5",
"last_reported": 1609866109,
"lat": 12.34,
"lon": 56.78,
"is_reserved": false,
"is_disabled": false,
"vehicle_type_id": "abc123",
"rental_uris": {
"android": "https://www.example.com/app?bike_id=973a5c94-c288-4a2b-afa6-de8aeb6ae2e5&platform=android&",
"ios": "https://www.example.com/app?bike_id=973a5c94-c288-4a2b-afa6-de8aeb6ae2e5&platform=ios"
}
},
{
"bike_id": "987fd100-b822-4347-86a4-b3eef8ca8b53",
"last_reported": 1609866204,
"is_reserved": false,
"is_disabled": false,
"vehicle_type_id": "def456",
"current_range_meters": 6543.0,
"station_id": "86",
"pricing_plan_id": "plan3"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"bikes": [
{
"bike_id": "45bd3fb7-a2d5-4def-9de1-c645844ba962",
"last_reported": 1609866109,
"lat": 12.345678,
"lon": 56.789012,
"is_reserved": false,
"is_disabled": false,
"vehicle_type_id": "abc123",
"current_range_meters": 400000.0,
"available_until": "2021-05-17T15:00:00Z",
"home_station_id": "station1",
"vehicle_equipment": [
"child_seat_a",
"winter_tires"
]
},
{
"bike_id": "d4521def-7922-4e46-8e1d-8ac397239bd0",
"last_reported": 1609866204,
"is_reserved": false,
"is_disabled": false,
"vehicle_type_id": "def456",
"current_fuel_percent": 0.7,
"current_range_meters": 6543.0,
"station_id": "86",
"pricing_plan_id": "plan3",
"home_station_id": "146",
"vehicle_equipment": [
"child_seat_a"
]
}
]
}
}
31 changes: 31 additions & 0 deletions models/rust/src/2.3/files/examples/specification/gbfs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"en": {
"feeds": [
{
"name": "system_information",
"url": "https://www.example.com/gbfs/1/en/system_information"
},
{
"name": "station_information",
"url": "https://www.example.com/gbfs/1/en/station_information"
}
]
},
"fr" : {
"feeds": [
{
"name": "system_information",
"url": "https://www.example.com/gbfs/1/fr/system_information"
},
{
"name": "station_information",
"url": "https://www.example.com/gbfs/1/fr/station_information"
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"versions": [
{
"version": "2.0",
"url": "https://www.example.com/gbfs/2/gbfs"
},
{
"version": "2.3",
"url": "https://www.example.com/gbfs/3/gbfs"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
{
"last_updated": 1640887163,
"ttl": 60,
"version": "2.3",
"data": {
"geofencing_zones": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-122.578067,
45.562982
],
[
-122.661838,
45.562741
],
[
-122.661151,
45.504542
],
[
-122.578926,
45.5046625
],
[
-122.578067,
45.562982
]
]
],
[
[
[
-122.650680,
45.548197
],
[
-122.650852,
45.534731
],
[
-122.630939,
45.535212
],
[
-122.630424,
45.548197
],
[
-122.650680,
45.548197
]
]
]
]
},
"properties": {
"name": "NE 24th/NE Knott",
"start": 1593878400,
"end": 1593907260,
"rules": [
{
"vehicle_type_id": [
"moped1",
"car1"
],
"ride_allowed": false,
"ride_through_allowed": true,
"maximum_speed_kph": 10,
"station_parking": true
}
]
}
}
]
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"stations": [
{
"station_id": "pga",
"name": "Parking garage A",
"lat": 12.345678,
"lon": 45.678901,
"parking_type": "underground_parking",
"parking_hoop": false,
"contact_phone": "+33109874321",
"is_charging_station": true,
"vehicle_type_capacity": {
"abc123": 7,
"def456": 9
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"stations": [
{
"station_id": "station12",
"name": "SE Belmont & SE 10 th",
"lat": 45.516445,
"lon": -122.655775,
"is_valet_station": false,
"is_virtual_station": true,
"is_charging_station": false,
"station_area": {
"type": "MultiPolygon",
"coordinates": [
[
[
[
-122.655775,
45.516445
],
[
-122.655705,
45.516445
],
[
-122.655705,
45.516495
],
[
-122.655775,
45.516495
],
[
-122.655775,
45.516445
]
]
]
]
},
"capacity": 16,
"vehicle_capacity": {
"abc123": 8,
"def456": 8,
"ghi789": 16
}
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"last_updated": 1640887163,
"ttl": 0,
"version": "2.3",
"data": {
"stations": [
{
"station_id": "station1",
"is_installed": true,
"is_renting": true,
"is_returning": true,
"last_reported": 1609866125,
"num_docks_available": 3,
"num_docks_disabled" : 1,
"vehicle_docks_available": [
{
"vehicle_type_ids": [ "abc123", "def456" ],
"count": 2
},
{
"vehicle_type_ids": [ "def456" ],
"count": 1
}
],
"num_bikes_available": 1,
"num_bikes_disabled": 2,
"vehicle_types_available": [
{
"vehicle_type_id": "abc123",
"count": 1
},
{
"vehicle_type_id": "def456",
"count": 0
}
]
},
{
"station_id": "station2",
"is_installed": true,
"is_renting": true,
"is_returning": true,
"last_reported": 1609866106,
"num_docks_available": 8,
"num_docks_disabled" : 1,
"vehicle_docks_available": [
{
"vehicle_type_ids": [ "abc123" ],
"count": 6
},
{
"vehicle_type_ids": [ "def456" ],
"count": 2
}
],
"num_bikes_available": 6,
"num_bikes_disabled": 1,
"vehicle_types_available": [
{
"vehicle_type_id": "abc123",
"count": 2
},
{
"vehicle_type_id": "def456",
"count": 4
}
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"last_updated": 1604519393,
"ttl": 60,
"version": "2.3",
"data": {
"alerts": [
{
"alert_id": "21",
"type": "station_closure",
"station_ids": [
"123",
"456",
"789"
],
"times": [
{
"start": 1604448000,
"end": 1604674800
}
],
"url": "https://example.com/more-info",
"summary": "Disruption of Service",
"description": "The three stations on Broadway will be out of service from 12:00am Nov 3 to 3:00pm Nov 6th to accommodate road work",
"last_updated": 1604198100
}
]
}
}
Loading
Loading