设施卡片

以清晰的图标网格显示设施,包含营业时间及当前开放情况。

帮助客人找到所需,从早晨咖啡到夜晚游泳。每周和夜间时间设置开放状态;显式覆盖处理连续服务和临时关闭。

直播卡片

此卡由浏览器绘制,使用与播放器相同的代码,带示例数据。

类别:消息。标签:大厅与接待,导向与目录,日程安排。

布局

此全屏卡在横屏或竖屏时填满整个屏幕,不作为角落、芯片或条带放置。

布局:全屏。表单:横向,纵向。

卡片布局、主题和发布。浏览卡片。

数据与隐私

此卡使用其配置的属性和实时卡数据。

属性

有关主题、背景、强调色和位置,请参见通用属性。

创建卡片时,在卡片的params中设置静态属性。其数据文档仅包含动态属性。嵌套行描述其父属性的内容。

静态属性

名称类型默认数值和限制描述
titlestring"Make yourself at home"maxLength:60
subtitlestring""maxLength:120
focusstring""maxLength:60紧凑视图使用确切的设施名称;否则使用第一个开放的设施,然后是第一个。
hour12booleanfalse
perPageinteger64, 6, 8, 12
pageSecondsinteger12最小值:8;最大值:120
backgroundColor字符串,空值null模式:"^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$"用纯色 CSS 顺序覆盖卡片背景和底板。#RRGGBBAA 提供透明度。背景无则优先。
textColor字符串,空值null模式:"^#[0-9A-Fa-f]{6}([0-9A-Fa-f]{2})?$"覆盖主文本和次要文本颜色。强调色和语义状态色保持原有功能。

动态属性

名称类型默认数值和限制描述
footnotestring""maxLength:160
updatedAtstring""maxLength:40
amenitiesarray[]minItems:0;maxItems:24
amenities[].namestringminLength:1;maxLength:60;必填
amenities[].icon空值,字符串nullnull, "activity-01", "air-vent", "airplane-01", "alert-01", "alert-02", "american-football", "analytics-up", "apple", "arrow-down-01", "arrow-down-right-01", "arrow-up-01", "arrow-up-right-01", "award-01", "baseball", "basketball-01", "battery-full", "bell-ring", "bicycle", "birthday-cake", "bitcoin", "bus-01", "calendar-03", "calendar-04", "calendar-add-01", "calendar-check", "call-02", "camera-01", "cancel-circle", "car-01", "champion", "chart-decrease", "chart-increase", "checkmark-circle-02", "clock-01", "clock-02", "cloud", "cloud-angled-rain", "cloud-angled-zap", "cloud-big-rain", "cloud-drizzle", "cloud-fog", "cloud-hailstone", "cloud-snow", "coffee-01", "coffee-02", "contact-01", "container-truck-01", "cricket-bat", "crown", "delivery-truck-01", "dices", "discord", "discount-tag-01", "dollar-02", "door-closed-locked", "door-open", "drink", "droplet", "ethereum", "euro", "exchange-01", "facebook-01", "factory", "fast-wind", "favourite", "ferry-boat", "fire", "fire-02", "first-aid-kit", "flag-01", "flag-02", "flash", "flower-01", "football", "gauge", "gift", "git-branch", "globe-02", "google", "hand-prayer", "heart", "help-circle", "home-01", "hourglass", "humidity", "ice-hockey", "information-circle", "instagram", "lamp-01", "lantern", "leaf-01", "leaf-02", "lightbulb", "link-01", "linkedin-01", "litecoin", "location-01", "location-04", "mail-01", "medal-first-place", "medical-mask", "meeting-room", "megaphone-01", "message-01", "money-exchange-02", "moon-02", "moon-cloud", "moon-star", "music-note-01", "navigation-03", "new-releases", "new-twitter", "news", "news-01", "noodles", "package-delivered", "parking-area-square", "party", "party-popper", "pause-circle", "percent-circle", "pinterest", "pizza-01", "play-circle", "play-store", "podium", "pound", "pumpkin", "qr-code", "qr-code-01", "queue-01", "quote-down", "quote-up", "ranking", "restaurant-01", "rocket-01", "rss", "running-shoes", "sale-tag-01", "security-check", "shop-sign", "shopping-bag-01", "siren", "smart-phone-01", "snapchat", "snowflake", "sparkles", "spotify", "star", "star-half", "star-off", "stop-circle", "store-01", "sun-03", "sun-cloud-02", "sunrise", "sunset", "swimming", "tag-01", "target-02", "temperature", "tennis-ball", "thermometer", "thermometer-cold", "thermometer-warm", "threads", "ticket-01", "tiktok", "time-quarter-pass", "timer-01", "tornado-02", "train-01", "tram", "trophy", "tropical-storm", "tsunami", "user-02", "user-group", "user-love-01", "vegetarian-food", "volleyball", "volume-high", "vote", "walking", "warehouse", "waves", "whatsapp", "wheat-off", "wifi-01", "wifi-full-signal", "wifi-lock", "wrench-01", "yen", "youtube"
amenities[].locationstring""maxLength:60
amenities[].notestring""maxLength:100
amenities[].modestring"hours""hours", "always", "closed"明确始终开放或关闭的覆盖;营业时间使用每周时间表。缺失的时间表示未知,而非关闭。
amenities[].hoursarray[]minItems:0;maxItems:4
amenities[].hours[].openstring模式:"^([01]\\d|2[0-3]):[0-5]\\d$";必填
amenities[].hours[].closestring模式:"^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$";必填
amenities[].hours[].daysarray[1,2,3,4,5,6,7]minItems:1;maxItems:7
amenities[].changedAtstring""maxLength:40

画布示例

将静态属性保存为 params.json 并创建卡片。结果中包含它的 crd_ ID。

{
  "theme": "neomustard"
}
screenrig card create --type amenities --major 1 --file params.json

将此项目添加到播放列表页面的primitives中,并用该 ID 替换示例中的 ID。发布播放列表并分配屏幕。

{
  "id": "amenities",
  "primitive": "card",
  "card": "crd_01EXAMPLECARD000000000",
  "layout": "full",
  "content_fit": "fill"
}

写入实时数据

创建卡片后向其写入文档,之后替换该文档即可更新屏幕,无需重新发布。卡片会按其动态属性检查每次写入,并拒绝它不接受的文档。请使用与播放列表相同的项目。

将文档保存为card-data.json。CLI直接读取文档,无需包装:

{
  "footnote": "",
  "updatedAt": "",
  "amenities": []
}
screenrig card data put crd_01EXAMPLECARD000000000 --file card-data.json

或直接调用 API。API 将相同文档包装在 document 字段中。智能体令牌已指定其项目,因此不发送项目头;若发送 ScreenRig-Project,必须与令牌项目匹配。通过环境提供 API 授权;详见 API 认证。

curl --request PUT "https://api.screenrig.ai/api/cards/crd_01EXAMPLECARD000000000/data" \
  --header "Authorization: Bearer $SCREENRIG_TOKEN" \
  --header "Content-Type: application/json" \
  --data '{"document":{"footnote":"","updatedAt":"","amenities":[]}}'