google_analytics_v4_api 0.0.4 → 0.0.6

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: e445dae3054767495db0ac92f151124aa6461a9ef9aabbc0f730500367ea5b09
4
- data.tar.gz: faa4d4804016bd7c65f16326fa971415bfa02cdf4c06df6b03d17905fce30f8b
3
+ metadata.gz: 80fe5da009017d0b675b9f679c41690390f012d5e980cdbd548499e146d16b62
4
+ data.tar.gz: 4fdfb3348ae31ce5084ffd321b5d6ae3c73dba90cea90ff7b1f7c7e73bf4a341
5
5
  SHA512:
6
- metadata.gz: 88c36509bc89b0c7a9da6b8f1e9cf33488307351453a90119ccfeaf65dc604189184a24d3adcc9e9e92a7d64fd7b44138b0ade2d3bd3c475f31c130027a81ab0
7
- data.tar.gz: b55dcfaf9609e1d350a91c1f95df653d3f8e9a68f2ef367ae48aaac66b4be6d1312939371f2db74da878a9da73ecb96325377fc38d69401414937f330dd6972e
6
+ metadata.gz: 04022d91dbad5ac979f6c2a4396f6d85006d8009f835130752a0e6297fc10a21f03019d7da4df54a31205125d8dad736503f202284aa986d79d5e1b504105e0f
7
+ data.tar.gz: 5eaf1d02be973e452a1458c81ab5258ce48c113af37febbdb4accd422d7ae9123b103ae57a15dc74c46eef7087f965a97e20587e5de8bce2f14c575e61ff6d88
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_analytics_v4_api (0.0.4)
4
+ google_analytics_v4_api (0.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -16,10 +16,10 @@ module GoogleAnalyticsV4Api
16
16
 
17
17
  def to_json
18
18
  output = {}
19
- output[:dateRanges] = @date_ranges if @date_ranges
20
- output[:dimensions] = @dimensions if @dimensions.any?
21
- output[:metrics] = @metrics if @metrics.any?
22
- output[:dimensionFilter] = @dimension_filter if @dimension_filter.any?
19
+ output[:dateRanges] = @date_ranges
20
+ output[:dimensions] = @dimensions if !@dimensions.nil? && @dimensions.any?
21
+ output[:metrics] = @metrics if !@metrics.nil? && @metrics.any?
22
+ output[:dimensionFilter] = @dimension_filter if !@dimension_filter.nil? && @dimension_filter.any?
23
23
  output.to_json
24
24
  end
25
25
  end
@@ -10,8 +10,8 @@ module GoogleAnalyticsV4Api
10
10
 
11
11
  def initialize(body)
12
12
  @body = JSON.parse body
13
- @raw_dimension_headers = @body["dimensionHeaders"]
14
- @raw_metric_headers = @body["metricHeaders"]
13
+ @raw_dimension_headers = @body["dimensionHeaders"] || []
14
+ @raw_metric_headers = @body["metricHeaders"] || []
15
15
  @rows = @body["rows"] || []
16
16
  @row_cont = @body["rowCount"] || 0
17
17
  @metadata = @body["metadata"]
@@ -1,3 +1,3 @@
1
1
  module GoogleAnalyticsV4Api
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: google_analytics_v4_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Garcia
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-01-12 00:00:00.000000000 Z
11
+ date: 2023-01-13 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A very humble wrapper for the Google Analytics V4 API to be used in conjuntion
14
14
  with OAuth2