Dining halls card

Which campus dining halls are open now, what meal and until when, how busy each one is, and what each station serves.

Category: Schools. Tags: Schools and campuses, Schedules, Queues and waits.

Previews

Dining halls
Canvas
Dining halls
Corner
Dining halls
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.dining/v1.

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

Counts and menus only, never who is eating.

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"Dining halls"maxLength: 40
sortstring"status""status", "feed"status lists open halls first, then those opening later, then closed ones; feed keeps the order given.
busyLowinteger40minimum: 1; maximum: 90Under this percent full a hall reads Quiet.
busyHighinteger75minimum: 10; maximum: 100At or above this percent full a hall reads Busy.
maxStationsinteger4minimum: 0; maximum: 6
showStationsbooleantrue
staleMinutesinteger30minimum: 1; maximum: 1440
hour12booleanfalse
timeZonestring, nullnull

Dynamic properties

NameTypeDefaultValues and limitsDescription
hallsarray[]maxItems: 8The halls. A feed (screenrig.dining/v1) wins when present; the data store supplies the same rows otherwise.
halls[].namestringminLength: 1; maxLength: 40; Required
halls[].locationstringmaxLength: 40
halls[].closedbooleanfalseClosed all day (a break, a holiday); note says why.
halls[].notestringmaxLength: 60
halls[].mealsarraymaxItems: 8Today's serving times.
halls[].meals[].kindstringmaxLength: 20; Requiredbreakfast, brunch, lunch, dinner, late-night or snack; other text shows as written.
halls[].meals[].startstringmaxLength: 32; RequiredISO 8601; with an offset or wall time in the screen's zone.
halls[].meals[].endstringmaxLength: 32; Required
halls[].busyPercentintegerminimum: 0; maximum: 100How full the hall is now.
halls[].waitMinutesintegerminimum: 0; maximum: 240The line, in minutes.
halls[].stationsarraymaxItems: 12
halls[].stations[].namestringmaxLength: 30; Required
halls[].stations[].mealstringmaxLength: 20Shows only in this meal; empty: every meal.
halls[].stations[].itemsarraymaxItems: 6
updatedstring""maxLength: 32When the readings were taken, 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": "dining-halls",
  "primitive": "card",
  "card": "dining-halls",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "dining-halls-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/dining-halls-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"halls":[],"updated":""}}'