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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 124374da03379231cce650f2e8c6c328c321acc5
4
- data.tar.gz: c41727b53d8dfb815cb1f1b22670e85e7fe28695
3
+ metadata.gz: 060ef2b4799e34f3e8d61131de66cbdae027c883
4
+ data.tar.gz: 9746f916e23b7fd3604dae0175ad9a96e090ab24
5
5
  SHA512:
6
- metadata.gz: 0e7942a45719e44c61bbfb201c6d30848ba2a77c0919dfbc8c231101c1e20c0cdb24cefd12c37b44258b63cd3c1c4dc1465624b08e3ffa9427f4e1da43f36491
7
- data.tar.gz: 2978f963807cf13a8a88fba079f7fc9c769f46517ea5c7f0d395910c149a11b9b2c34ea158a4ce8b1efb779c39233dbd8a988ec7bc1f68cf50843396585df759
6
+ metadata.gz: 07ebdc85b13de1a1f3adff5471debff72550868594ef29786ad6c674d5f4893c4762c9c1f34279ff9ab18a46dfd433b6af98d39e4893f7bb75c17e7b8f19f041
7
+ data.tar.gz: 161afca7eb9f1cf69fc2c7f128f142616a095864cd9bd522ead9ae092a8cb3759c0aa2811ef112e9957547f3ec5c7cf1e58b7f4d9957b6f61aed41743896cacf
data/CHANGELOG CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.51
4
+ improve rubicon
5
+
3
6
  ## 0.1.46
4
7
  implement imonomy
5
8
 
@@ -22,11 +22,10 @@ class AdopsReportScrapper::RubiconClient < AdopsReportScrapper::BaseClient
22
22
  def scrap
23
23
  date_str = date.strftime '%F'
24
24
 
25
- header_params = { Accept: 'application/json', params: { start: date_str, end: date_str, columns: 'Time_Date,Site_NameShort,Country_Name,Prorated_NetworkImpressions,Prorated_Revenue', source: 'standard' } }
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['columns']]
30
- @data += data['results'].map(&:values)
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
@@ -1,3 +1,3 @@
1
1
  module AdopsReportScrapper
2
- VERSION = "0.1.50"
2
+ VERSION = "0.1.51"
3
3
  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.50
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-29 00:00:00.000000000 Z
11
+ date: 2017-01-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient