adops_report_scrapper 0.1.50 → 0.1.51
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +3 -0
- data/lib/adops_report_scrapper/rubicon_client.rb +3 -4
- data/lib/adops_report_scrapper/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 060ef2b4799e34f3e8d61131de66cbdae027c883
|
4
|
+
data.tar.gz: 9746f916e23b7fd3604dae0175ad9a96e090ab24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07ebdc85b13de1a1f3adff5471debff72550868594ef29786ad6c674d5f4893c4762c9c1f34279ff9ab18a46dfd433b6af98d39e4893f7bb75c17e7b8f19f041
|
7
|
+
data.tar.gz: 161afca7eb9f1cf69fc2c7f128f142616a095864cd9bd522ead9ae092a8cb3759c0aa2811ef112e9957547f3ec5c7cf1e58b7f4d9957b6f61aed41743896cacf
|
data/CHANGELOG
CHANGED
@@ -22,11 +22,10 @@ class AdopsReportScrapper::RubiconClient < AdopsReportScrapper::BaseClient
|
|
22
22
|
def scrap
|
23
23
|
date_str = date.strftime '%F'
|
24
24
|
|
25
|
-
|
26
|
-
response = RestClient::Request.execute method: :get, url: "https://api.rubiconproject.com/sellers/api/reports/v1/#{@account_id}/", user: @login, password: @secret, headers: header_params
|
25
|
+
response = RestClient::Request.execute method: :get, url: "https://api.rubiconproject.com/analytics/v1/report/?account=publisher/#{@account_id}&start=#{date_str}T00:00:00-07:00&end=#{date_str}T23:59:59-08:00&dimensions=date,site,country,device_type,ad_format&metrics=bid_requests,paid_impression,revenue", user: @login, password: @secret
|
27
26
|
|
28
27
|
data = JSON.parse response.body
|
29
|
-
@data = [data['
|
30
|
-
@data += data['
|
28
|
+
@data = [data['data']['items'].first.keys]
|
29
|
+
@data += data['data']['items'].reject{ |item| item['date'] != date_str }.map(&:values)
|
31
30
|
end
|
32
31
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: adops_report_scrapper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.51
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Stayman Hou
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-01-
|
11
|
+
date: 2017-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|