Bike share card

Bike share stations near the screen: bikes, e-bikes and free docks at the nearest station in big counters, and the next stations by walking time.

Category: Public information. Tags: Transit and travel, Wayfinding and directories.

Previews

Bike share
Canvas
Bike share
Corner
Bike share
Chip

Views and forms

Views: canvas, corner, chip. Canvas forms: landscape, portrait, square, strip.

Card views, themes and publishing. Browse the gallery.

Data and privacy

Feed: screenrig.bikeshare/v1.

Feed documents carry source attribution. The Player supplies the feed to the card.

Properties

For theme, background, accent and position, see Common properties.

Set static properties in params. Bind data to a project card data key for live values; that document holds only dynamic properties. Without a data key, put the complete configuration in params. Nested rows describe the contents of their parent property.

Static properties

NameTypeDefaultValues and limitsDescription
titlestring"Bike share"maxLength: 40
modestring"rent""rent", "return"rent features the nearest station with a bike; return the nearest with a free dock.
countinteger6minimum: 3; maximum: 12Most stations in the list beside the nearest.
maxDistanceMinteger1500minimum: 100; maximum: 20000
unitsstring"metric""metric", "imperial"
walkMetersPerMininteger80minimum: 30; maximum: 150
staleMinutesinteger15minimum: 2; maximum: 1440
hour12booleanfalse

Dynamic properties

NameTypeDefaultValues and limitsDescription
stationsarray[]minItems: 0; maxItems: 100Nearby stations. A feed (screenrig.bikeshare/v1) wins when present; the data store supplies the same rows otherwise.
stations[].idstringmaxLength: 40
stations[].namestringminLength: 1; maxLength: 80; Required
stations[].bikesintegerminimum: 0; maximum: 999; RequiredBikes available, e-bikes included.
stations[].ebikesinteger0minimum: 0; maximum: 999Of those, the electric ones.
stations[].docksintegerminimum: 0; maximum: 999; RequiredFree docks.
stations[].distanceMnumberminimum: 0; maximum: 100000Metres from the screen.
stations[].walkMinnumberminimum: 0; maximum: 600Minutes on foot. Empty works it out from the distance.
stations[].statusstringmaxLength: 20active (default), closed, offline or out-of-service.
updatedstring""maxLength: 32When the counts were fetched, ISO 8601 (data store only; a feed carries fetchedAt).

Canvas example

Add this item to a playlist page’s primitives. Publish the playlist and assign a screen.

{
  "id": "bike-share",
  "primitive": "card",
  "card": "bike-share",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "bike-share-main"
}

Write live data

Create this document before showing the card, then replace it to update the screen without republishing. Use the same project as the playlist. Supply your API authorization through the environment; see API authentication.

curl --request PUT "https://api.screenrig.ai/api/card-data/bike-share-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"stations":[],"updated":""}}'