m2x 2.0.2 → 2.1.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: a9b3171048b83b4ed8005c46ea14d79d14e5c4ca
4
- data.tar.gz: f60bfea82d2192e0cae29ec6d3108aba5c1d74e7
3
+ metadata.gz: 9affc8594c00bbcb4dd5b570afdc9deacb6ae493
4
+ data.tar.gz: 204e7043534ee6b80c32475f5200ae4e9db6f87c
5
5
  SHA512:
6
- metadata.gz: 092ef245aaec30611adc11997565d669797e303204dd1b28db883c55fcc9feb5a4c29b8c1627869beec68b819a0e69a76d5637a202cb5eca30eb7673762fee5e
7
- data.tar.gz: b1bf2a416fea48dd56146385c75c012b9eee7eaef12668012a9328f2900313778eacafeb285a42ebf2715ec93368d7f04b46656d9cd96c6bd91cb6e79823c910
6
+ metadata.gz: 53641a6fad6d8ae91d37cdbee0fadf02efe4082391e29f82252415378dfa4ce9514a29a1614a2f635ce1faf86a6409f46f12cc454b77b71bc2f08bb1b61110b3
7
+ data.tar.gz: 1e77ac43920349303a243cda56c7e707c447a5fe0a75163223ed6e847ec26eddad4c556aa8b83cb3a5fcf9f4d29463c6ec4ab35cac10221bfe19c6948cff2c67
@@ -29,12 +29,12 @@ class M2X::Client::Device < M2X::Client::Resource
29
29
  res.json["devices"].map{ |atts| new(client, atts) } if res.success?
30
30
  end
31
31
 
32
- # List Device Groups
33
- # Retrieve the list of device groups for the authenticated user.
32
+ # List Device Tags
33
+ # Retrieve the list of device tags for the authenticated user.
34
34
  #
35
- # https://m2x.att.com/developer/documentation/v2/device#List-Device-Groups
36
- def groups(client)
37
- client.get("#{PATH}/groups")
35
+ # https://m2x.att.com/developer/documentation/v2/device#List-Device-Tags
36
+ def tags(client)
37
+ client.get("#{PATH}/tags")
38
38
  end
39
39
 
40
40
  # Create a new device
@@ -102,7 +102,7 @@ class M2X::Client::Device < M2X::Client::Resource
102
102
  # The optional location attribute can contain location information that will
103
103
  # be used to update the current location of the specified device
104
104
  #
105
- # https://staging.m2x.sl.attcompute.com/developer/documentation/v2/device#Post-Device-Updates--Multiple-Values-to-Multiple-Streams-
105
+ # https://m2x.att.com/developer/documentation/v2/device#Post-Device-Updates--Multiple-Values-to-Multiple-Streams-
106
106
  def post_updates(params)
107
107
  @client.post("#{path}/updates", nil, params, "Content-Type" => "application/json")
108
108
  end
@@ -20,6 +20,12 @@ class M2X::Client::Resource
20
20
  @attributes = res.json if res.success?
21
21
  end
22
22
 
23
+ # Refresh the resource details and return self
24
+ def refresh
25
+ view
26
+ self
27
+ end
28
+
23
29
  # Update an existing resource details
24
30
  def update!(params)
25
31
  @client.put(path, nil, params, "Content-Type" => "application/json")
@@ -7,7 +7,7 @@ class M2X::Client::Stream < M2X::Client::Resource
7
7
  #
8
8
  # https://m2x.att.com/developer/documentation/v2/device#View-Data-Stream
9
9
  def fetch(client, device, name)
10
- res = client.get("#{device.path}/streams/#{name}")
10
+ res = client.get("#{device.path}/streams/#{URI.encode(name)}")
11
11
 
12
12
  new(client, device, res.json) if res.success?
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module M2X
2
2
  class Client
3
- VERSION = "2.0.2"
3
+ VERSION = "2.1.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.0.2
4
+ version: 2.1.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: 2015-03-17 00:00:00.000000000 Z
13
+ date: 2015-04-02 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