Skip to content

Latest commit

 

History

History
239 lines (164 loc) · 3.57 KB

data-models.md

File metadata and controls

239 lines (164 loc) · 3.57 KB

Data Models

Payload and response object reference for the GdeBenz client API, derived from observed browser traffic.

All models describe observed client-side payloads. Additional fields may be present server-side.


Station

Represents a gas station entity returned by /api/nearby, /api/stations and /api/search.

Fields

Field Type Description
osm_id string OpenStreetMap identifier
name string Station name
brand string Fuel brand (Lukoil, Shell, etc.)
lat number Latitude
lon number Longitude
status object Aggregated fuel availability (see below)
prices object Optional fuel prices
updated_at number Last update timestamp
distance number Distance from query point (/api/nearby only)

Extended scoring fields (confirmations, confidenceBase, fuels_now, limited, freshConflict, etc.) are documented in Responses.

Status object

Field Type Meaning
yes number Votes "fuel available"
no number Votes "no fuel"
queue number Queue reports
low number Low fuel reports

NearbyResponse

Returned by /api/nearby.

Fields

Field Type Description
stations Station[] List of nearby stations
cache boolean Whether the response is cached
ttl number Cache TTL

StationsViewportResponse

Returned by /api/stations.

Fields

Field Type
stations Station[]
bounds object
zoom number

Bounds object

{
  "lat1": 0,
  "lon1": 0,
  "lat2": 0,
  "lon2": 0
}

VT Token

Returned by /api/vt.

{
  "vt": "string",
  "ttl": 1800
}

RT Token

Returned by /api/rt.

{
  "rt": "string"
}

Comment

Used in /api/comments.

Fields

Field Type
osm_id string
name string
lat number
lon number
status string
text string
fp string
vt string
cvt string
created_at number
likes number (optional)
dislikes number (optional)

ViewsResponse

Returned by /api/views.

Fields

Field Type
views object

Views object

Map of station ID to view count:

{
  "station_id": 0,
  "views": 0
}

ShareSnapshot

Returned by /api/share-snapshot.

Fields

Field Type
image_url string
width number
height number
osm_id string

ThanksResponse

Returned by /api/thanks and /api/thanks/mine.

Fields

Field Type
user_id string
thanks_count number
recent array

GeoIPResponse

Returned by /api/geoip.

Fields

Field Type
lat number
lon number
country string
city string

ReverseCityResponse

Returned by /api/reverse-city.

Field Type
city string
region string
country string

ConfigResponse

Returned by /api/cfg.

Fields

Field Type
version string
features object
limits object
endpoints object

Fingerprint

Generated via getFingerprint().

  • Stored in localStorage.gas_cid.
  • Used in comments, voting and suggestions.

CVT Token (optional)

Structure:

{
  "osm": "string",
  "tok": "string"
}