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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3968aa346b7e66d1096c29eef5dbcfab5814196b722fe2890dfcc2f671d70d63
|
4
|
+
data.tar.gz: 9267710cb171c3974dc6d136ea3d2dc1429ae61e2606f0df0d167590338b0883
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c9905e38e8a5a0d891b52cd692e99fdd395380962d4b65adfb6d790fa944b01e761876b4c78c0c7834f432f2f0f2ecb394042bd3e41d085a974f0b111db1e23
|
7
|
+
data.tar.gz: bef1b28a7ee2fcf906ae732152762b300e37f67beb387b56c7eca6eabb7d8ce7235839436e9d7d2e5cd4195e93b55961f2ababeeb651dbea1f182ffaf62fe812
|
data/Gemfile.lock
CHANGED
@@ -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
|