messageGet method

Future<Map<String, dynamic>> messageGet(
  1. String id
)
inherited

messageGet -> /v1/message/{id}

Requests the details of the specified message.

PARAMETERS

id (required) : The ID of the message, either UUID, name, or index.

  • Example (by_uuid): 3C39C433-5C18-4F51-B357-55BB870227C4
  • Example (by_name): Mask
  • Example (by_index): 3

RESPONSE 200:

The request was processed successfully.

content-type: application/json

schema:

{
  "type": "object",
  "required": [
    "id",
    "message",
    "theme"
  ],
  "example": {
    "id": {
      "name": "Test Message",
      "uuid": "942C3FC3-C4B2-44F7-A55D-4CC913BB8A5D",
      "index": 0
    },
    "message": "Text {text}, Clock {System Clock}, Countdown {Timer 1}, Countdown to time {Timer 2}, Elapsed {Timer 3}",
    "tokens": [
      {
        "name": "text",
        "text": {
          "text": "142"
        }
      },
      {
        "name": "System Clock",
        "clock": {
          "format": {
            "date": "short",
            "time": "long",
            "is_24_hours": true
          }
        }
      },
      {
        "name": "Timer 1",
        "timer": {
          "configuration": {
            "id": {
              "name": "Timer 1",
              "uuid": "43b4c5c6-145a-4b19-9968-7b78e6980e82",
              "index": 0
            },
            "allows_overrun": true,
            "countdown": {
              "duration": 300
            }
          },
          "format": {
            "hour": "remove_long",
            "minute": "remove_long",
            "second": "short",
            "millisecond": "none"
          }
        }
      },
      {
        "name": "Timer 2",
        "timer": {
          "configuration": {
            "id": {
              "name": "Timer 2",
              "uuid": "1355b458-5f99-4e6e-8ac7-8522061f6bdb",
              "index": 0
            },
            "allows_overrun": true,
            "count_down_to_time": {
              "time_of_day": "09:30",
              "period": "am"
            }
          },
          "format": {
            "hour": "remove_long",
            "minute": "remove_long",
            "second": "short",
            "millisecond": "none"
          }
        }
      },
      {
        "name": "Timer 3",
        "timer": {
          "configuration": {
            "id": {
              "name": "Timer 3",
              "uuid": "8efe5ec8-daf4-4609-aea2-7c80efa7f6fa",
              "index": 0
            },
            "allows_overrun": true,
            "elapsed": {
              "start_time": 0
            }
          },
          "format": {
            "hour": "remove_long",
            "minute": "remove_long",
            "second": "short",
            "millisecond": "none"
          }
        }
      }
    ],
    "theme": {
      "name": "Default",
      "uuid": "f5468354-01fb-44d8-b7b3-5ede94c6115c",
      "index": 0
    }
  }
}

Implementation

Future<Map<String, dynamic>> messageGet(String id) async {
  String url = '/v1/message/$id';

  return await call('get', url, httpAccept: 'application/json');
}