adops_report_scrapper 0.1.61 → 0.1.62
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.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5601b07d21e2faa78af8c8437dc421710ee443d1
|
|
4
|
+
data.tar.gz: f99f7465028d86170f5714dac2bcf7a237cbc8d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d3a366dbc34a9e96740714ae865be067e4153f2559350f312b7af22cd6777c143066bc7e7b83d3917ac362e77fb771449ab3f54c0426496c5fa7f07f9c609a81
|
|
7
|
+
data.tar.gz: 142425cb523cce5f3ffb85278fa5d22a0ad697b8c76f29deb1d1172bc625d5585e2a106b576c9800784ec1ea841a6e39720029936b7ffaabfdf67a4de33bef4e
|
|
@@ -25,7 +25,7 @@ class AdopsReportScrapper::AppnexusClient < AdopsReportScrapper::BaseClient
|
|
|
25
25
|
response_data = JSON.parse(response.body)
|
|
26
26
|
token = response_data['response']['token']
|
|
27
27
|
|
|
28
|
-
response = RestClient.post 'http://api.appnexus.com/report', { 'report' => { 'report_type' => 'network_analytics', 'report_interval' => 'last_7_days', 'columns' => %w(day publisher_name geo_country supply_type imp_requests imps clicks total_convs revenue) } }.to_json, { content_type: :json, accept: :json, authorization: token }
|
|
28
|
+
response = RestClient.post 'http://api.appnexus.com/report', { 'report' => { 'report_type' => 'network_analytics', 'report_interval' => 'last_7_days', 'columns' => %w(day publisher_name site_name geo_country supply_type imp_requests imps clicks total_convs revenue) } }.to_json, { content_type: :json, accept: :json, authorization: token }
|
|
29
29
|
response_data = JSON.parse(response.body)
|
|
30
30
|
report_id = response_data['response']['report_id']
|
|
31
31
|
|
|
@@ -36,6 +36,6 @@ class AdopsReportScrapper::AppnexusClient < AdopsReportScrapper::BaseClient
|
|
|
36
36
|
fail 'appnexus report failed' unless response_data['response']['execution_status'] == 'ready'
|
|
37
37
|
|
|
38
38
|
response = RestClient.get "http://api.appnexus.com/report-download?id=#{report_id}", { authorization: token }
|
|
39
|
-
@data = CSV.parse(response.body).select { |row| row[0] == 'day' || (row[0] == date_str && row[
|
|
39
|
+
@data = CSV.parse(response.body).select { |row| row[0] == 'day' || (row[0] == date_str && row[5].to_i > 0) }
|
|
40
40
|
end
|
|
41
41
|
end
|