# Dining halls card

> Canonical HTML: https://screenrig.ai/docs/cards/dining-halls/

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](/cards/dining-halls/v1/screenshots/canvas-bloom.webp?sha=5b13aa92cec7d948a6b44181214738f12eaada11a8063ff0da0f4faeebe50e94)

Canvas

![Dining halls](/cards/dining-halls/v1/screenshots/corner-bloom.webp?sha=bcb3a231fe080b82abfa7a72488abb9994544a394c9ad95770c5f33ee276d91d)

Corner

![Dining halls](/cards/dining-halls/v1/screenshots/chip-bloom.webp?sha=6244c7c62dd4e76bd6a43f4ee882b44a8c7eed7fbd86039a3a340f038f6ae450)

Chip

## Views and forms

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

[Card views, themes and publishing](/docs/cards/). [Browse the gallery](/apps/#cards).

## 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](/docs/cards/#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

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `title` | string | `"Dining halls"` | maxLength: `40` |  |
| `sort` | string | `"status"` | `"status"`, `"feed"` | status lists open halls first, then those opening later, then closed ones; feed keeps the order given. |
| `busyLow` | integer | `40` | minimum: `1`; maximum: `90` | Under this percent full a hall reads Quiet. |
| `busyHigh` | integer | `75` | minimum: `10`; maximum: `100` | At or above this percent full a hall reads Busy. |
| `maxStations` | integer | `4` | minimum: `0`; maximum: `6` |  |
| `showStations` | boolean | `true` |  |  |
| `staleMinutes` | integer | `30` | minimum: `1`; maximum: `1440` |  |
| `hour12` | boolean | `false` |  |  |
| `timeZone` | string, null | `null` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `halls` | array | `[]` | maxItems: `8` | The halls. A feed (screenrig.dining/v1) wins when present; the data store supplies the same rows otherwise. |
| `halls[].name` | string |  | minLength: `1`; maxLength: `40`; Required |  |
| `halls[].location` | string |  | maxLength: `40` |  |
| `halls[].closed` | boolean | `false` |  | Closed all day (a break, a holiday); note says why. |
| `halls[].note` | string |  | maxLength: `60` |  |
| `halls[].meals` | array |  | maxItems: `8` | Today's serving times. |
| `halls[].meals[].kind` | string |  | maxLength: `20`; Required | breakfast, brunch, lunch, dinner, late-night or snack; other text shows as written. |
| `halls[].meals[].start` | string |  | maxLength: `32`; Required | ISO 8601; with an offset or wall time in the screen's zone. |
| `halls[].meals[].end` | string |  | maxLength: `32`; Required |  |
| `halls[].busyPercent` | integer |  | minimum: `0`; maximum: `100` | How full the hall is now. |
| `halls[].waitMinutes` | integer |  | minimum: `0`; maximum: `240` | The line, in minutes. |
| `halls[].stations` | array |  | maxItems: `12` |  |
| `halls[].stations[].name` | string |  | maxLength: `30`; Required |  |
| `halls[].stations[].meal` | string |  | maxLength: `20` | Shows only in this meal; empty: every meal. |
| `halls[].stations[].items` | array |  | maxItems: `6` |  |
| `updated` | string | `""` | maxLength: `32` | When 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](/docs/cards/#publish-a-card-canvas).

```json
{
  "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](/docs/authentication/).

```console
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":""}}'
```
