messageTrigger method
messageTrigger
-> /v1/message/{id}/trigger
Triggers / Shows the specified message.
PARAMETERS
id
: 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
postBody
(optional) : This is the data that can be sent with this request.
Example (trigger_message):
[
{
"name": "My Text Token",
"text": {
"text": "Hello, world!"
}
},
{
"name": "Countdown Timer",
"timer": {
"configuration": {
"allows_overrun": true,
"countdown": {
"duration": 3600
},
"format": {
"hour": "none",
"minute": "short",
"second": "long",
"millisecond": "remove_short"
}
}
}
},
{
"name": "Countdown To Time",
"timer": {
"configuration": {
"allows_overrun": true,
"count_down_to_time": {
"time_of_day": 1800,
"period": "pm"
},
"format": {
"hour": "long",
"minute": "long",
"second": "none",
"millisecond": "none"
}
}
}
},
{
"name": "Elapsed Timer",
"timer": {
"configuration": {
"allows_overrun": false,
"elapsed": {
"start_time": 0,
"end_time": 300
},
"format": {
"hour": "none",
"minute": "short",
"second": "long",
"millisecond": "none"
}
}
}
},
{
"name": "My Clock Token",
"clock": {
"format": {
"date": "full",
"time": "short",
"is_24_hours": false
}
}
}
]
RESPONSE 204:
The request was processed successfully. There is no response body.
content-type: NONE
RESPONSE 400:
The request was not valid.
content-type: ``
Implementation
Future<bool> messageTrigger(String id, List postBody) async {
String url = '/v1/message/$id/trigger';
return await call('post', url, httpAccept: 'application/json');
}