# Course timetable card

> Canonical HTML: https://screenrig.ai/docs/cards/course-timetable/

A building's classes today in time order: course, title, instructor and room, with what is on now and what starts next.

Category: Schools. Tags: Schools and campuses, Schedules, Wayfinding and directories.

## Previews

![Course timetable](/cards/course-timetable/v1/screenshots/canvas-bloom.webp?sha=5c5fd24b71e7e7c3cd25a776312cb8f664924f27aea8ef5572c3c1ed3b857d5f)

Canvas

![Course timetable](/cards/course-timetable/v1/screenshots/corner-bloom.webp?sha=74b30f17bcec303cca144c96848d90e4b4b443556410070a75568d8a8282fe43)

Corner

![Course timetable](/cards/course-timetable/v1/screenshots/chip-bloom.webp?sha=f617949942b4528af326af94ac7621aade7b95c6c9891c065b0ad07a4bac3f73)

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.timetable/v1`.

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

Only the course, instructor and room the school publishes; never who is enrolled.

## 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 | `"Today's classes"` | maxLength: `40` |  |
| `soonMinutes` | integer | `15` | minimum: `1`; maximum: `120` | A class starting within this many minutes reads as starting soon. |
| `showInstructor` | boolean | `true` |  |  |
| `staleMinutes` | integer | `60` | minimum: `1`; maximum: `1440` |  |
| `hour12` | boolean | `false` |  |  |
| `timeZone` | string, null | `null` |  |  |

### Dynamic properties

| Name | Type | Default | Values and limits | Description |
| --- | --- | --- | --- | --- |
| `sessions` | array | `[]` | maxItems: `200` | The building's classes today. A feed (screenrig.timetable/v1) wins when present; the data store supplies the same rows otherwise. |
| `sessions[].course` | string |  | minLength: `1`; maxLength: `16`; Required | CPSC 110. |
| `sessions[].title` | string |  | maxLength: `60` | Computation, Programs and Programming. |
| `sessions[].instructor` | string |  | maxLength: `40` |  |
| `sessions[].room` | string |  | maxLength: `24` |  |
| `sessions[].kind` | string |  | maxLength: `16` | Lecture, lab, tutorial or seminar. |
| `sessions[].start` | string |  | maxLength: `32`; Required | ISO 8601; with an offset or wall time in the screen's zone. |
| `sessions[].end` | string |  | maxLength: `32`; Required |  |
| `sessions[].status` | string | `"scheduled"` | `"scheduled"`, `"moved"`, `"cancelled"` |  |
| `sessions[].note` | string |  | maxLength: `50` | Room changed from 101. |
| `updated` | string | `""` | maxLength: `32` | When the timetable was read, 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": "course-timetable",
  "primitive": "card",
  "card": "course-timetable",
  "major": 1,
  "params": {
    "theme": "neomustard"
  },
  "rect": {
    "x": 0,
    "y": 0,
    "width": 1920,
    "height": 1080
  },
  "layer": 0,
  "content_fit": "fill",
  "data": "course-timetable-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/course-timetable-main" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "ScreenRig-Project: $SCREENRIG_PROJECT" \
  --header "Content-Type: application/json" \
  --data '{"document":{"sessions":[],"updated":""}}'
```
