m2x 2.6.0 → 2.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/m2x/device.rb +10 -0
  3. data/lib/m2x/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2df83391fd90e9c9f4f55d0a641e63defe16ba3c
4
- data.tar.gz: 91c7801e47439fd6da3647c13c43bf1024c22335
3
+ metadata.gz: 6f99957f1081641ba2aa36bcb42ba14d060f870f
4
+ data.tar.gz: 12a42074fdd8c1508bde7f1873efb9afeade3d64
5
5
  SHA512:
6
- metadata.gz: 50a34788fec3c8616ef32c3d9dc9fbd04454d47c631e314d8490766818907744cebdab5e6d975345d35abca245250bd0c9edea9616b65a8011e45a62e60722fb
7
- data.tar.gz: ee6d3ba03c5ea86a37234258ec7c8a3a58edc063caf511a03ca7e44d9f6000ad5d211e2c7ca09f3f6bd44ba40f82775e5a9615a271fb5574379d3db66800e724
6
+ metadata.gz: 4cd1e7dfc0385584032cf6380a8af2499b3fb14c245c1f978eba890afe0bf68360fefd7005194bb3d23d638fee1b02a417b4c18da2b13587eb3387b91185fd91
7
+ data.tar.gz: fa53b1cd4087a9379ac136e07ab49c721584afc7d287b6d36d4941b6feb51dac0549f9c8241b6f8abbfed8504964ee5a87277ebe8b424c39a85bc0ba4a9379b3
@@ -99,6 +99,16 @@ class M2X::Client::Device < M2X::Client::Resource
99
99
  @client.put("#{path}/location", nil, params, "Content-Type" => "application/json")
100
100
  end
101
101
 
102
+ # Delete waypoints in a device's location history by a date range
103
+ # The `start` and `stop` parameters should be ISO8601 timestamps
104
+ #
105
+ # https://m2x.att.com/developer/documentation/v2/device#Delete-Location-History
106
+ def delete_locations!(start, stop)
107
+ params = { from: start, end: stop }
108
+
109
+ @client.delete("#{path}/location/waypoints", nil, params, "Content-Type" => "application/json")
110
+ end
111
+
102
112
  # Post Device Updates (Multiple Values to Multiple Streams)
103
113
  #
104
114
  # This method allows posting multiple values to multiple streams
@@ -1,5 +1,5 @@
1
1
  module M2X
2
2
  class Client
3
- VERSION = "2.6.0"
3
+ VERSION = "2.7.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.6.0
4
+ version: 2.7.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-07-07 00:00:00.000000000 Z
13
+ date: 2016-07-25 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