m2x 2.4.1 → 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/m2x/collection.rb +15 -0
- data/lib/m2x/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 59f5fa4e180f9d9067d21cfbbb3342958af3d50b
|
4
|
+
data.tar.gz: 49b24d5d53244a4cee2fa4184cbe511b3f58c944
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9281c9fb417a8dcca37a16f4694376178817f890df0709a009e8ed09114b11ed2083bc5538d42b59c8550215c22dfd56b3583f7f536944d0ed662633b1b4c543
|
7
|
+
data.tar.gz: 07bd17b448b28a10feb2e381575861d45372884ec41bb4c48d47e75aeb72ea1dfcd8750a60e70e5b21c29c4638641d5dd516d019ce57c856f74576adb74b8270
|
data/lib/m2x/collection.rb
CHANGED
@@ -26,9 +26,24 @@ class M2X::Client::Collection < M2X::Client::Resource
|
|
26
26
|
|
27
27
|
new(client, res.json) if res.success?
|
28
28
|
end
|
29
|
+
|
29
30
|
end
|
30
31
|
|
31
32
|
def path
|
32
33
|
@path ||= "#{ PATH }/#{ URI.encode(@attributes.fetch("id")) }"
|
33
34
|
end
|
35
|
+
|
36
|
+
# Add device to collection
|
37
|
+
#
|
38
|
+
# https://m2x.att.com/developer/documentation/v2/collections#Add-device-to-collection
|
39
|
+
def add_device(device_id)
|
40
|
+
@client.put("#{ path }/devices/#{ device_id }")
|
41
|
+
end
|
42
|
+
|
43
|
+
# Remove device from collection
|
44
|
+
#
|
45
|
+
# https://m2x.att.com/developer/documentation/v2/collections#Remove-device-from-collection
|
46
|
+
def remove_device(device_id)
|
47
|
+
@client.delete("#{ path }/devices/#{ device_id }")
|
48
|
+
end
|
34
49
|
end
|
data/lib/m2x/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: m2x
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leandro López
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-05-26 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
15
|
description: AT&T’s M2X is a cloud-based fully managed data storage service for network
|
16
16
|
connected machine-to-machine (M2M) devices. From trucks and turbines to vending
|