Packages

Erlang client library for the AT&T M2X (http://m2x.att.com) API. AT&T M2X is a cloud-based fully managed time-series data storage service for network connected machine-to-machine (M2M) devices and the Internet of Things (IoT).

Current section

Files

Jump to
m2x_erlang src m2x_key.erl
Raw

src/m2x_key.erl

-module(m2x_key).
%% API
-export([view/2 ]).
-export([ update/3]).
-export([delete/2 ]).
-export([regenerate/2 ]).
%% @doc Get details of the specified key.
%% https://m2x.att.com/developer/documentation/v2/keys#View-Key-Details
view(Client, Key) -> Client({get, <<"/keys/", Key/binary>>}).
%% @doc Update the specified key's information.
%% https://m2x.att.com/developer/documentation/v2/keys#Update-Key
update(Client, Key, Params) -> Client({put, <<"/keys/", Key/binary>>, Params}).
%% @doc Delete the specified key.
%% https://m2x.att.com/developer/documentation/v2/keys#Delete-Key
delete(Client, Key) -> Client({delete, <<"/keys/", Key/binary>>}).
%% @doc Regenerate the specified key.
%% https://m2x.att.com/developer/documentation/v2/keys#Regenerate-Key
regenerate(Client, Key) -> Client({post, <<"/keys/", Key/binary, "/regenerate">>}).