每日氣象報告範例

每日氣象報告範例是一種調適型卡片,旨在搭配 MSN 天氣使用,以便將每日氣象更新張貼到 Teams 頻道。

範例天氣。

輸入/輸出和附註

動態語彙基元名稱 預留位置文字 備註
{acCityState} 查看範本 顯示文字
變數可以用來保存 [城市]、[州/省] 或 [郵遞區號] 值
{acDailySummary} 查看範本 顯示文字
{acCurrentDateTime} 查看範本 顯示文字
{acUrlConditionsImage} 查看範本 顯示文字
查看範本註解 這必須取代為有效的 URL
{acCurrentTemperature} 查看範本 顯示文字
{actempHi} 查看範本 顯示文字
{actempLow} 查看範本 顯示文字
{
    "$schema": "http://adaptivecards.io/schemas/adaptive-card.json",
    "type": "AdaptiveCard",
    "version": "1.0",
    "body": [
        {
            "type": "TextBlock",
            "text": "{acCity}, {acState}",
            "size": "Large",
            "isSubtle": true
        },
        {
            "type": "TextBlock",
            "text": "{acCurrentDateTime}",
            "spacing": "None"
        },
        {
            "type": "TextBlock",
            "text": "{acDailySummary}",
            "spacing": "None"
        },
        {
            "type": "ColumnSet",
            "columns": [
                {
                    "type": "Column",
                    "width": "auto",
                    "items": [
                        {
                            "type": "Image",
                            "url": "{acUrlConditionsImage}",
                            "size": "Large"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "auto",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "{acCurrentTemperature}",
                            "size": "ExtraLarge",
                            "spacing": "None"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "°F",
                            "weight": "Bolder",
                            "spacing": "Small"
                        }
                    ]
                },
                {
                    "type": "Column",
                    "width": "stretch",
                    "items": [
                        {
                            "type": "TextBlock",
                            "text": "Hi {actempHi}",
                            "horizontalAlignment": "Left"
                        },
                        {
                            "type": "TextBlock",
                            "text": "Lo {actempLow}",
                            "horizontalAlignment": "Left",
                            "spacing": "None"
                        }
                    ]
                }
            ]
        }
    ]
}