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 +4 -4
- data/Gemfile.lock +1 -1
- data/lib/omnievent/google/version.rb +1 -1
- data/lib/omnievent/strategies/google.rb +12 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17457c1afa0cc309b5145db2aa4671ab5c66805a154ce75337227a93f1518329
|
4
|
+
data.tar.gz: 2c54e783679fa7738b5e8ed9a7ff88253e83f0a769c203e6d7214939ac9a68e4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 54e9e976df87da13faa174b269cdd62d33a53db1dc0bfe21f2099d2915c87381ea210c8e7444a2836dfa6c85ca1f4b1e3c55ebc7ac384e3e6e462df6326cb29b
|
7
|
+
data.tar.gz: 72adbcaebd73a3ffe8130222c800410bcfc84e3b38682b9f442307774c7a5bb99fb1f35db568064edabe0317aa965bd9c94c03a3be68314234ab7526ab346935
|
data/Gemfile.lock
CHANGED
@@ -14,15 +14,14 @@ module OmniEvent
|
|
14
14
|
API_VERSION = "v3"
|
15
15
|
|
16
16
|
def raw_events
|
17
|
-
|
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,
|
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,
|
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
|