google_api 1.0.1 → 1.0.2
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.
- data/CHANGELOG.md +5 -0
- data/lib/google_api/ga/data.rb +9 -1
- data/lib/google_api/version.rb +1 -1
- metadata +2 -1
data/CHANGELOG.md
ADDED
data/lib/google_api/ga/data.rb
CHANGED
@@ -80,7 +80,7 @@ module GoogleApi
|
|
80
80
|
end
|
81
81
|
|
82
82
|
def #{key}=(value)
|
83
|
-
|
83
|
+
value = value.to_i
|
84
84
|
|
85
85
|
@#{key} = value
|
86
86
|
end
|
@@ -293,6 +293,10 @@ module GoogleApi
|
|
293
293
|
self.ids = Ga.id
|
294
294
|
end
|
295
295
|
|
296
|
+
if @ids.nil? || @ids == 0
|
297
|
+
raise GoogleApi::GaError, "Ids is required."
|
298
|
+
end
|
299
|
+
|
296
300
|
@parameters = {}
|
297
301
|
|
298
302
|
@parameters['ids'] = "ga:#{@ids}"
|
@@ -325,6 +329,10 @@ module GoogleApi
|
|
325
329
|
result = _session.client.execute( api_method: _session.api.data.ga.get,
|
326
330
|
parameters: parameters )
|
327
331
|
|
332
|
+
if result.error?
|
333
|
+
raise GoogleApi::GaError, result.error_message
|
334
|
+
end
|
335
|
+
|
328
336
|
_cache.write(parameters, result, @cache) if @cache.is_a?(Integer)
|
329
337
|
|
330
338
|
result
|
data/lib/google_api/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- .gitignore
|
70
70
|
- .rspec
|
71
71
|
- .travis.yml
|
72
|
+
- CHANGELOG.md
|
72
73
|
- Gemfile
|
73
74
|
- LICENSE
|
74
75
|
- README.md
|