POST https://fcm.googleapis.com/v1/projects/{project}/messages:send).
Delivers one event to one device through the FCM HTTP v1 API
(POST https://fcm.googleapis.com/v1/projects/{project}/messages:send).
ok.UNREGISTERED → {dead, unregistered, _} (token deleted).INVALID_ARGUMENT mentioning the registration token →
{dead, invalid_token, _}; any other 400 is a payload problem
and never deletes a token.{failed, _, _}.build_message/2 is pure and exported so payload shapes can
be unit tested.
| build_message/2 | The FCM v1 message object for one device. |
| send/2 | Send Event to the FCM token in Target. |
| string_data/1 | FCM data values must be strings: binaries pass through,
numbers and booleans are stringified, objects/arrays JSON-encoded. |
build_message(Event::notifier_event:event(), X2::notifier_event:target()) -> map()
The FCM v1 message object for one device.
send(Event::notifier_event:event(), Target::notifier_event:target()) -> notifier_dispatch:outcome()
Send Event to the FCM token in Target.
string_data(Data::map()) -> #{binary() => binary()}
FCM data values must be strings: binaries pass through,
numbers and booleans are stringified, objects/arrays JSON-encoded.
Generated by EDoc