{
  "formatVersion": 1,
  "experienceId": "match-day",
  "revision": 1,
  "minHostVersion": "0.1.0",
  "title": "Match Day",
  "subtitle": "Your teams. One small scoreboard.",
  "icon": "football",
  "tint": "#A5C9FF",
  "runtime": "native",
  "tables": [
    {
      "id": "sports.scores",
      "name": "Sports scores",
      "fields": [
        {
          "name": "home",
          "type": "string",
          "required": true
        },
        {
          "name": "away",
          "type": "string",
          "required": true
        },
        {
          "name": "homeScore",
          "type": "number",
          "required": false
        },
        {
          "name": "awayScore",
          "type": "number",
          "required": false
        },
        {
          "name": "status",
          "type": "string",
          "required": false
        },
        {
          "name": "retrievedAt",
          "type": "date",
          "required": false
        }
      ]
    },
    {
      "id": "sports.favorites",
      "name": "Favorite teams",
      "fields": [
        {
          "name": "title",
          "type": "string",
          "required": true
        }
      ]
    }
  ],
  "seeds": [
    {
      "tableId": "sports.favorites",
      "id": "arsenal",
      "values": {
        "title": "Arsenal FC"
      }
    }
  ],
  "dataBindings": [
    {
      "tableId": "sports.scores",
      "access": "write"
    },
    {
      "tableId": "sports.favorites",
      "access": "write"
    }
  ],
  "capabilities": [
    "network:https://api.football-data.org"
  ],
  "connections": [
    {
      "id": "football-scores",
      "kind": "http",
      "url": "https://api.football-data.org/v4/matches",
      "method": "GET",
      "credentialId": "football.personal",
      "credentialHeader": "X-Auth-Token",
      "credentialPrefix": "",
      "headers": {},
      "responsePath": "matches",
      "saveToTableId": "sports.scores",
      "fieldMapping": {
        "home": "homeTeam.name",
        "away": "awayTeam.name",
        "homeScore": "score.fullTime.home",
        "awayScore": "score.fullTime.away",
        "status": "status"
      }
    }
  ],
  "native": {
    "root": {
      "id": "root",
      "type": "stack",
      "props": {
        "gap": 20
      },
      "children": [
        {
          "id": "intro",
          "type": "stack",
          "props": {},
          "children": [
            {
              "id": "eyebrow",
              "type": "text",
              "props": {
                "text": "MADE FOR YOUR EVERYDAY",
                "variant": "eyebrow"
              }
            },
            {
              "id": "heading",
              "type": "text",
              "props": {
                "text": "Keep an eye on the game",
                "variant": "title"
              }
            },
            {
              "id": "description",
              "type": "text",
              "props": {
                "text": "Connect your football-data.org key. Scores refresh while this screen is open; provider coverage and delays apply.",
                "variant": "body"
              }
            }
          ]
        },
        {
          "id": "scoreboard",
          "type": "scores",
          "props": {
            "tableId": "sports.scores",
            "favoritesTableId": "sports.favorites",
            "requestId": "football-scores"
          }
        },
        {
          "id": "teams",
          "type": "form",
          "props": {
            "title": "Follow a team",
            "tableId": "sports.favorites",
            "fields": [
              {
                "name": "title",
                "label": "Team name",
                "type": "string"
              }
            ]
          }
        }
      ]
    }
  },
  "assets": [],
  "releaseNotes": "First edition. Sample content is labeled; your edits stay on this device."
}
