google_analytics_v4_api 0.0.3 → 0.0.5

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: 516d5859258748f1f4749df54b064cc3caf1b9707028041fd0db0084a75d719d
4
- data.tar.gz: 0030de2106fff16d2ad13e7feb9c98af718fa0c55b04c30a9eecd462ff8df08a
3
+ metadata.gz: e7050078fae7248eeb571242439f9042faddf4c258c672aad42d0ce684f10e35
4
+ data.tar.gz: cf1eee223ddc9a858860ba6c2ce384126faf40f37b404551f45741c17759bde5
5
5
  SHA512:
6
- metadata.gz: 3bee4ad056696d0829191e46f6187c0d5a29cfeaebc5ad7fba3ea3b0766aa7d004b1b99ec26f854f4f7cf6d636c94f1f3b097e2ad5991413e7507be3e545443c
7
- data.tar.gz: 060b03b7c94203270e627dcc35ae8e1262ccbb467040b5221c86518c4815b16a5239d3c77699ea43a8b5b511160d948143a4069aaa3b67b8af8d398e14ef4be6
6
+ metadata.gz: 57d08ee5e5e68e234add0875817118b0bdeae43949ee79a7cb3d7b31c828e90ba995a58a2bce8521728dad2a151a1be5e0bcc882988ea4bbffd6f8852804521a
7
+ data.tar.gz: 79b280644dcf3726917a8cce147d5ea6e048a3e16deab043264f17cbcfe566646dfd0c7047b65e8d21f5384058b473f8e20ccb5b91dad3d766188bf65badeefe
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- google_analytics_v4_api (0.0.3)
4
+ google_analytics_v4_api (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -15,12 +15,12 @@ module GoogleAnalyticsV4Api
15
15
  end
16
16
 
17
17
  def to_json
18
- {
19
- "dateRanges": @date_ranges,
20
- "dimensions": @dimensions,
21
- "metrics": @metrics,
22
- "dimensionFilter": @dimension_filter
23
- }.to_json
18
+ output = {}
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
+ output.to_json
24
24
  end
25
25
  end
26
26
  end
@@ -12,8 +12,8 @@ module GoogleAnalyticsV4Api
12
12
  @body = JSON.parse body
13
13
  @raw_dimension_headers = @body["dimensionHeaders"]
14
14
  @raw_metric_headers = @body["metricHeaders"]
15
- @rows = @body["rows"]
16
- @row_cont = @body["rowCount"]
15
+ @rows = @body["rows"] || []
16
+ @row_cont = @body["rowCount"] || 0
17
17
  @metadata = @body["metadata"]
18
18
  @kind = @body["kind"]
19
19
  end
@@ -1,3 +1,3 @@
1
1
  module GoogleAnalyticsV4Api
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.5"
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.3
4
+ version: 0.0.5
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-09 00:00:00.000000000 Z
11
+ date: 2023-01-12 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