Astarte.API.Pairing.Agent.register_device
You're seeing just the function
register_device
, go back to Astarte.API.Pairing.Agent module for more information.
Link to this function
register_device(client, device_id)
Specs
register_device(client :: Astarte.API.client(), device_id :: String.t()) :: Astarte.API.result()
Registers a device.
client
is a Pairing API client created with Astarte.API.Pairing.client/3
.
device_id
is a valid Astarte device id, you can create a random one with :crypto.strong_rand_bytes(16) |> Base.url_encode64(padding: false)
Return values
{:ok, result}
if the HTTP request can be performed.result
will be a map withstatus
,headers
andbody
.{:error, reason}
if the HTTP request can't be performed.