omnievent-google 0.1.0.pre2 → 0.1.0.pre3

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 582c4cf9831a82c8e9486939f5df891635c9f8c4de75eb334563616f13ef50b1
4
- data.tar.gz: 4ecb96a099fb0d18754ddce917b14363700742abffb7aef4999b80357c6e22ec
3
+ metadata.gz: 17457c1afa0cc309b5145db2aa4671ab5c66805a154ce75337227a93f1518329
4
+ data.tar.gz: 2c54e783679fa7738b5e8ed9a7ff88253e83f0a769c203e6d7214939ac9a68e4
5
5
  SHA512:
6
- metadata.gz: 1bb759fe04b74d3acc40dabac35617a386aecdc37980b652124aff5b01892e56277d6db6428a2af22808674ebadcc085b766c42357b6093c3879e7dd8ee278af
7
- data.tar.gz: 59fd7b9593e51a1927f1da44e8ea6adbe12ebbc9e7a01feec793fcef3118034356e146622b1c62c733447f9aa87a894d4f6e2e962a25cc5828c88782f40c9e1a
6
+ metadata.gz: 54e9e976df87da13faa174b269cdd62d33a53db1dc0bfe21f2099d2915c87381ea210c8e7444a2836dfa6c85ca1f4b1e3c55ebc7ac384e3e6e462df6326cb29b
7
+ data.tar.gz: 72adbcaebd73a3ffe8130222c800410bcfc84e3b38682b9f442307774c7a5bb99fb1f35db568064edabe0317aa965bd9c94c03a3be68314234ab7526ab346935
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- omnievent-google (0.1.0.pre1)
4
+ omnievent-google (0.1.0.pre2)
5
5
  omnievent
6
6
  omnievent-api
7
7
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniEvent
4
4
  module Google
5
- VERSION = "0.1.0.pre2"
5
+ VERSION = "0.1.0.pre3"
6
6
  end
7
7
  end
@@ -14,15 +14,14 @@ module OmniEvent
14
14
  API_VERSION = "v3"
15
15
 
16
16
  def raw_events
17
- params = options.slice(:from_time, :to_time)
18
- response = perform_request(path: request_path_with_params(params))
17
+ response = perform_request(path: request_path_with_params(list_params))
19
18
  events = response && response["items"]
20
19
 
21
- next_link = build_next_link(response, params)
20
+ next_link = build_next_link(response, list_params)
22
21
  while next_link
23
22
  response = perform_request(path: next_link)
24
23
  events << response["value"]
25
- next_link = build_next_link(response, params)
24
+ next_link = build_next_link(response, list_params)
26
25
  end
27
26
 
28
27
  events
@@ -162,6 +161,15 @@ module OmniEvent
162
161
  "timeZone": "UTC"
163
162
  }
164
163
  end
164
+
165
+ def list_params
166
+ @list_params ||= begin
167
+ params = {}
168
+ params[:timeMin] = options.from_time if options.from_time
169
+ params[:timeMax] = options.to_time if options.to_time
170
+ params
171
+ end
172
+ end
165
173
  end
166
174
  end
167
175
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omnievent-google
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre2
4
+ version: 0.1.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Angus McLeod