v2_intuity 1.0.7 → 1.0.8
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/v2_intuity/streams/stream.rb +4 -4
- data/lib/v2_intuity/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd7b3f7ead4b9c20e0c0de775ed2ef9fb5d75f2
|
4
|
+
data.tar.gz: 51a331236ca49fee463b61398c70760e2a726804
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ead98f583b1fe8eb62ffd2ede164ca3b26d150cc73f38f4fcaa3f0a9a1b7271fd24f0096c45f647571f072cd3831b9ed4914e9aa8fee4072eb577905bf810d49
|
7
|
+
data.tar.gz: f72ce42889ccab39976e3c6c210287180835a4504e5ce60748353d0069b9cacba9c5b17fe2a5e8973d1551560e6c050d48129ef342c29bce82eafd8eac14c6ea
|
@@ -35,13 +35,13 @@ module V2Intuity
|
|
35
35
|
when V2Intuity::Request::METHODS[:post]
|
36
36
|
raise 'name is required' unless name
|
37
37
|
body = { name: name, start_date: start_date,
|
38
|
-
resource_filters: resource_filters }.
|
39
|
-
options = { method: method, body: body.
|
38
|
+
resource_filters: resource_filters }.delete_if {|k,v| v.nil?} # supported resource_query_filters include measurement, nutrition, sleep, workout
|
39
|
+
options = { method: method, body: body.delete_if {|k,v| v.nil?} }
|
40
40
|
|
41
41
|
when V2Intuity::Request::METHODS[:put]
|
42
42
|
raise 'stream id is needed' unless stream_id
|
43
43
|
body = { name: name }
|
44
|
-
options = { method: method, body: body.
|
44
|
+
options = { method: method, body: body.delete_if {|k,v| v.nil?}, id: stream_id }
|
45
45
|
|
46
46
|
else
|
47
47
|
raise 'incorrect method verb'
|
@@ -49,7 +49,7 @@ module V2Intuity
|
|
49
49
|
|
50
50
|
options[:query_filters] = query_filters unless query_filters.empty?
|
51
51
|
|
52
|
-
[V2Intuity::Endpoints::Stream.new, options.
|
52
|
+
[V2Intuity::Endpoints::Stream.new, options.delete_if {|k,v| v.nil?} ]
|
53
53
|
end
|
54
54
|
|
55
55
|
def format_resource_filters(filters)
|
data/lib/v2_intuity/version.rb
CHANGED