search_console_api 0.0.2 → 0.0.3

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: 4f2f148deeca1caa2726aa3ef8d7f5c6fa70a8219d93fb878a45a8492672a62e
4
- data.tar.gz: cf35d2bc4230fb99eb4cb5d31ff72c343e273a3173d633421eb1192f7a3fa0a6
3
+ metadata.gz: 3968aa346b7e66d1096c29eef5dbcfab5814196b722fe2890dfcc2f671d70d63
4
+ data.tar.gz: 9267710cb171c3974dc6d136ea3d2dc1429ae61e2606f0df0d167590338b0883
5
5
  SHA512:
6
- metadata.gz: 3c1898eb1a0624fa0a4e641b88e6f047b6654591bf43fa6d45e16646a6ab79f124aa12412d128cf128c43e3fbba73c84c56644870d8c2b73265788d412155946
7
- data.tar.gz: ba229f7ea69f1a198017a4be145a2219ffec9d00818bfc70fb34f5cee0fe9e5a5a8feba03935e169c8a3f65d4f5b7f411cd6c1171cbbc9556eb9a2aadbfc0939
6
+ metadata.gz: 0c9905e38e8a5a0d891b52cd692e99fdd395380962d4b65adfb6d790fa944b01e761876b4c78c0c7834f432f2f0f2ecb394042bd3e41d085a974f0b111db1e23
7
+ data.tar.gz: bef1b28a7ee2fcf906ae732152762b300e37f67beb387b56c7eca6eabb7d8ce7235839436e9d7d2e5cd4195e93b55961f2ababeeb651dbea1f182ffaf62fe812
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- search_console_api (0.0.2)
4
+ search_console_api (0.0.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -21,7 +21,7 @@ module SearchConsoleApi
21
21
 
22
22
  http.request request
23
23
  end
24
- raise SearchConsoleApi::Error.new(response) unless response.is_a?(Net::HTTPSuccess)
24
+ raise SearchConsoleApi::Error.new(response.body) unless response.is_a?(Net::HTTPSuccess)
25
25
 
26
26
  JSON.parse response.body
27
27
  end
@@ -38,7 +38,7 @@ module SearchConsoleApi
38
38
  request.body = payload
39
39
 
40
40
  response = https.request(request)
41
- raise SearchConsoleApi::Error.new(response) unless response.is_a?(Net::HTTPSuccess)
41
+ raise SearchConsoleApi::Error.new(response.body) unless response.is_a?(Net::HTTPSuccess)
42
42
 
43
43
  JSON.parse response.body
44
44
  end
@@ -1,3 +1,5 @@
1
+ require "date"
2
+
1
3
  module SearchConsoleApi
2
4
  module Resources
3
5
  module SearchAnalytics
@@ -5,8 +7,8 @@ module SearchConsoleApi
5
7
  def initialize(access_token:, site: nil, start_date: nil, end_date: nil, dimensions: [], type: nil, dimension_filter_groups: [], aggregation_type: nil, row_limit: nil, start_row: nil, data_state: nil)
6
8
  @access_token = access_token
7
9
  @site = site
8
- @start_date = start_date
9
- @end_date = end_date
10
+ @start_date = DateTime.parse(start_date).strftime("%Y-%m-%d")
11
+ @end_date = DateTime.parse(end_date).strftime("%Y-%m-%d")
10
12
  @dimensions = dimensions
11
13
  @type = type
12
14
  @dimension_filter_groups = dimension_filter_groups
@@ -57,4 +59,4 @@ module SearchConsoleApi
57
59
  end
58
60
  end
59
61
  end
60
- end
62
+ end
@@ -1,3 +1,3 @@
1
1
  module SearchConsoleApi
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: search_console_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gustavo Garcia