AtEx v0.20.21 AtEx.IoT View Source
This module holds the implementation for the HTTP Gateway that runs calls against the Africas Talking API IoT endpoints
Link to this section Summary
Functions
This function makes a POST request to to publish messages to your remote devices through the Africa's talking IOT endpoint The function accepts a map of parameters.
Link to this section Functions
This function makes a POST request to to publish messages to your remote devices through the Africa's talking IOT endpoint The function accepts a map of parameters.
Parameters
attrs: - a map containing:
deviceGroup
- The device group to which the message is to be senttopic
- The messaging channel to which the message is to be sent. In the form/ / payload
- The message packet to be sent to the subscribed devices.
Example
iex> AtEx.IoT.publish(%{
...> deviceGroup: "CrazyCats",
...> topic: "any-topic",
...> payload: "take me to your leader"
...> })
{:ok, %{ "status" => true, "description" => "Message processed successfully"}}