ambient-ruby-client 0.1.4 → 0.1.5

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
  SHA256:
3
- metadata.gz: a5cc2085b7b67a7b0c66639a370a6da3ce50490645e1952c9c2f186df2a55a64
4
- data.tar.gz: abfa32cdc63f9f8bb50a55fc3bef1abcead3af8b95fc844d6bad2b51d118dbd7
3
+ metadata.gz: f24874bd157faa92fd091571baf86d6766378f0589e6a40809277367fb7b2ad6
4
+ data.tar.gz: d7b93d3009cab106add6b90b78786e77e88bd7432fc12211c6f27b6e3d476615
5
5
  SHA512:
6
- metadata.gz: 707346b9160d14daab794b20b43f1a2dccabf3c4f6cece84ee1777fea63e64c0ea319fdb0f603425ebc1142929e89959a349d238723c848b3771ccff076bdf84
7
- data.tar.gz: 2aefa75ee839ed39df53d5acda2bb5adca48aabb0fe8243c348406bfae117c4b93833ee10c35a6e043837404c151cabbac2b1a15955f6a2a7c7f44dae6e13718
6
+ metadata.gz: 347abf4d517c36218a7e11a90626d72620458becd9e161c43d39b948d6aab227ce5df8884c5293785212e77ffb95309cba33bd5946c53a3498bd361d2748ce82
7
+ data.tar.gz: 91f6e7d0659629371d8b0f743b4f86b037abfc1df5c3d3f854a456f6af603cdb88a06f386881e73713fe51558d2dcdf991fc4e327695de0b25e31206bca6e88e
data/CHANGELOG.md CHANGED
@@ -1,2 +1,5 @@
1
+ # 0.1.5
2
+ A version that may even work!
3
+
1
4
  # 0.1.4
2
5
  The initial version
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ambient-ruby-client (0.1.4)
4
+ ambient-ruby-client (0.1.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -41,8 +41,8 @@ module Ambient
41
41
  end
42
42
 
43
43
  def device_data(device_mac_address, end_date: nil, limit: 288)
44
- path = "devices/macAddress"
45
- params = {macAddress: device_mac_address, endDate: end_date, limit: }
44
+ path = "devices/#{device_mac_address}"
45
+ params = {endDate: end_date, limit: }
46
46
 
47
47
  begin
48
48
  response = _get(path, @config, params: )
@@ -2,15 +2,15 @@
2
2
 
3
3
  module Ambient
4
4
  class DeviceInfo
5
- attr_reader :name, :location
5
+ attr_reader :name, :coords
6
6
 
7
7
  def self.from_hash(data)
8
- DeviceInfo.new(data.dig("name"), data.dig("location"))
8
+ DeviceInfo.new(data.dig("name"), data.dig("coords"))
9
9
  end
10
10
 
11
- def initialize(name, location)
11
+ def initialize(name, coords)
12
12
  @name = name
13
- @location = location
13
+ @coords = coords
14
14
  end
15
15
  end
16
16
 
@@ -18,7 +18,7 @@ module Ambient
18
18
  attr_reader :mac_address, :info, :last_data
19
19
 
20
20
  def self.from_hash(data)
21
- Device.new(data.dig("macAddress"), Ambient::DeviceInfo.from_hash(data.dig("info")), data.dig("lastData"))
21
+ Ambient::Device.new(data.dig("macAddress"), Ambient::DeviceInfo.from_hash(data.dig("info")), data.dig("lastData"))
22
22
  end
23
23
 
24
24
  ###
@@ -28,7 +28,7 @@ module Ambient
28
28
  # @param info [Ambient::DeviceInfo] information about the device
29
29
  # @param last_data [Hash] the latest measurement data from the device
30
30
  def initialize(mac_address, info, last_data)
31
- @mac_address = mac_address,
31
+ @mac_address = mac_address
32
32
  @info = info
33
33
  @last_data = last_data
34
34
  end
data/lib/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ambient
4
- VERSION = "0.1.4"
4
+ VERSION = "0.1.5"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ambient-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Ruiz