adops_report_scrapper 0.2.29 → 0.2.30
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/rhythmone_client.rb +6 -1
- 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: f49084c7ee64585fff30a1ae1ea1ccd554c864cd
|
4
|
+
data.tar.gz: 00e1f92e1a64a9cd63faa6c73576dd46efc1cb37
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02bf5233112d6fc6be7fa06ca2be8a55d0f1577be38072396310782a77105a0774f7072840b6078fb4acfdba5de904b0be0a17cb29a4258f059d9757eb4421be
|
7
|
+
data.tar.gz: a8aee043c69249a8a6c7797573dcf1c3efc55b93c2d9b1678a2f984fe89d5fa05e0eed6b6484e8366658ed7cc0f2aebe95bb24e6cf3e8f36ce5caabcf7cde448
|
data/CHANGELOG
CHANGED
@@ -33,12 +33,17 @@ class AdopsReportScrapper::RhythmoneClient < AdopsReportScrapper::BaseClient
|
|
33
33
|
def scrap
|
34
34
|
date_str = @date.strftime('%Y%m%d')
|
35
35
|
data_obj = nil
|
36
|
+
flag_valid_data_found = false
|
36
37
|
5.times do
|
37
38
|
response = HTTPClient.get("https://api.portal.rhythmone.com/v1/publishers/#{@publisher_id}/reports/standard_report", { ad_dimension: 0, endDate: date_str, endDateType: 1, groupBy1: 1, groupByTimePeriodType: 1, rmp_placement: 0, startDate: date_str, startDatePredefined: 0, startDateType: 1 }, { 'Authorization' => "Bearer #{@access_token}" })
|
38
39
|
data_obj = JSON.parse response.body
|
39
|
-
|
40
|
+
if data_obj.is_a?(Array) && !response.body.include? 'Data is still processing'
|
41
|
+
flag_valid_data_found = true
|
42
|
+
break
|
43
|
+
end
|
40
44
|
sleep 5
|
41
45
|
end
|
46
|
+
fail 'rhythmone report failed' unless flag_valid_data_found
|
42
47
|
@data = data_obj
|
43
48
|
end
|
44
49
|
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.2.
|
4
|
+
version: 0.2.30
|
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-07-
|
11
|
+
date: 2017-07-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httpclient
|