m2x 2.4.1 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb2f40231bfc590103fb79eabd82396ac0381ab8
4
- data.tar.gz: 0d123aa39ce0a151cbf4b34b6484fbb2d3096439
3
+ metadata.gz: 59f5fa4e180f9d9067d21cfbbb3342958af3d50b
4
+ data.tar.gz: 49b24d5d53244a4cee2fa4184cbe511b3f58c944
5
5
  SHA512:
6
- metadata.gz: 530ec5b9379f709f6d5b2bf0db4a6f20174dbd7fa632c45b3b9379799976a5f8b23b1e6163c13cc382e0a5ac408b93a8be39215141d9f406d255339e42b5a5b8
7
- data.tar.gz: df3391d100f258020a4eb2b1a73acdb97f42c6f04670c3d9d37706e0edcf767c225039781e51266d2a3811980729a3a0db203cacb40aa7ba0b61aded62ab8334
6
+ metadata.gz: 9281c9fb417a8dcca37a16f4694376178817f890df0709a009e8ed09114b11ed2083bc5538d42b59c8550215c22dfd56b3583f7f536944d0ed662633b1b4c543
7
+ data.tar.gz: 07bd17b448b28a10feb2e381575861d45372884ec41bb4c48d47e75aeb72ea1dfcd8750a60e70e5b21c29c4638641d5dd516d019ce57c856f74576adb74b8270
@@ -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
@@ -1,5 +1,5 @@
1
1
  module M2X
2
2
  class Client
3
- VERSION = "2.4.1"
3
+ VERSION = "2.5.0"
4
4
  end
5
5
  end
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.1
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-02-12 00:00:00.000000000 Z
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