adops_report_scrapper 0.2.24 → 0.2.25

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: fb9beb81dde043e82e3c034f4209bb2818645312
4
- data.tar.gz: 53bd361517c5d4e0044cd0e32f6478d0ceb912db
3
+ metadata.gz: 91f9f7c55196dd2ba536f16cbf7bf17068980286
4
+ data.tar.gz: 7cd52395b3a586fc990e6665e1b3700a1bb33105
5
5
  SHA512:
6
- metadata.gz: f213278d000ef893acdc3da822897534a02087fac7991e08549228e4e7159ac61e46ae75f2286a220717c6e797781d0013599c75e9cdd789e81a4a7d280ace8a
7
- data.tar.gz: a12820ed245f5cd5617dca72df8a4339d564d9c4d545bc74ed2549461afd7e702256f59a9345ce664f65338f572a6b25ef417a14e351b712607be70ab0cad109
6
+ metadata.gz: 3965ec7e1e82401dd1d512c893e6511404223c011f3b2323b7a7bb6220a21994225948a298f2581ac85edf224857b841fe34c4198b7e99d971ce6e71ea38af26
7
+ data.tar.gz: 4aeefe096a448720a5ef7863548ad94e98d00c1ce92c0f832bc335c8bb6794e32bb6a7269c3d514f3f7605c156c63fb07583340e1173961c3da04e082b5de921
@@ -32,6 +32,10 @@ class AdopsReportScrapper::AdsupplybuyerClient < AdopsReportScrapper::BaseClient
32
32
  response = RestClient.post "https://ui.adsupply.com/PublicPortal/Advertiser/#{@login}/Report/Export", SqlCommandId: '', ExportToExcel: 'False', IsOLAP: 'False', DateFilter: date_str, TimeZoneId: time_zone_id, Grouping: '1', 'DimAdvertiser.Value': "#{@login}~", 'DimAdvertiser.IsActive': 'True', 'DimCampaign.Value': '', 'DimCampaign.IsActive': 'True', ApiKey: @secret
33
33
 
34
34
  data = JSON.parse response
35
+ unless data[0]
36
+ @data = []
37
+ return
38
+ end
35
39
  header = data[0].keys
36
40
  @data = [header]
37
41
  @data += data.map do |datum|
@@ -46,6 +50,10 @@ class AdopsReportScrapper::AdsupplybuyerClient < AdopsReportScrapper::BaseClient
46
50
  response = RestClient.post "https://ui.adsupply.com/PublicPortal/Advertiser/#{@login}/Report/Export", SqlCommandId: '', ExportToExcel: 'False', IsOLAP: 'False', DateFilter: date_str, TimeZoneId: time_zone_id, Grouping: '0', ApiKey: @secret
47
51
 
48
52
  data = JSON.parse response
53
+ unless data[0]
54
+ @data = []
55
+ return
56
+ end
49
57
  header = data[0].keys
50
58
  @data = [header]
51
59
  @data += data.map do |datum|
@@ -1,3 +1,3 @@
1
1
  module AdopsReportScrapper
2
- VERSION = "0.2.24"
2
+ VERSION = "0.2.25"
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.2.24
4
+ version: 0.2.25
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-06-10 00:00:00.000000000 Z
11
+ date: 2017-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient