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).
The AT&T M2X API provides all the needed operations and methods to connect your devices to AT&T's M2X service. This client provides an easy to use interface for the lightweight Ruby interpreter for devices, mRuby.
Refer to the Glossary of Terms to understand the nomenclature used throughout this documentation.
- Signup for an M2X Account.
- Obtain your Master Key from the Master Keys tab of your Account Settings screen.
- Create your first Device and copy its Device ID.
- Review the M2X API Documentation.
In order to communicate with the M2X API, you need an instance of M2X::Client. You need to pass your API key in the constructor to access your data.
m2x = M2X::Client.new("<YOUR-API-KEY>")
The client object can be used to obtain object handles for M2X devices, streams and distributions.
-
device = m2x.device("<DEVICE-ID>")
-
device = m2x.device("<DEVICE-ID>") stream = device.stream("<STREAM-NAME>")
-
distribution = m2x.distribution("<DISTRIBUTION-ID>")
To keep the library size small, a minimal subset of the M2X API is provided in the object wrappers. However, the object client can be used to directly access any M2X API endpoint using REST methods:
m2x = M2X::Client.new("<YOUR-API-KEY>")
m2x.get("/some_path")
m2x.post("/some_other_path", nil, {foo:'bar'}, {"Content-Type" => "application/json"})
Refer to the documentation on each class for further usage instructions.
This gem aims to adhere to Semantic Versioning 2.0.0. As a summary, given a version number MAJOR.MINOR.PATCH
:
MAJOR
will increment when backwards-incompatible changes are introduced to the client.MINOR
will increment when backwards-compatible functionality is added.PATCH
will increment with backwards-compatible bug fixes.
Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH
format.
Note: the client version does not necessarily reflect the version used in the AT&T M2X API.
This gem is provided under the MIT license. See LICENSE for applicable terms.