adops_report_scrapper 0.2.25 → 0.2.26

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: 91f9f7c55196dd2ba536f16cbf7bf17068980286
4
- data.tar.gz: 7cd52395b3a586fc990e6665e1b3700a1bb33105
3
+ metadata.gz: c2777735b3cb3cfb8de88d05edb79918bf660e31
4
+ data.tar.gz: ebf3debd93bcd78810607c5a0b9b9a9687f5672d
5
5
  SHA512:
6
- metadata.gz: 3965ec7e1e82401dd1d512c893e6511404223c011f3b2323b7a7bb6220a21994225948a298f2581ac85edf224857b841fe34c4198b7e99d971ce6e71ea38af26
7
- data.tar.gz: 4aeefe096a448720a5ef7863548ad94e98d00c1ce92c0f832bc335c8bb6794e32bb6a7269c3d514f3f7605c156c63fb07583340e1173961c3da04e082b5de921
6
+ metadata.gz: 701c63913a160625244242a8e30611c68fc1dada03618621fbba7c9e1187ed2ca1508bf76edc459fc03b51cc2161a130dd1f8e4cf7680c0951aab874db277596
7
+ data.tar.gz: 83c33229928b9b90a2838bfd0a882bac8e4181f5b5c4fd170034dcd4d2282e4bb097e446ea847025f337848177d4e94b7186bd79cc92f0cbc383c038b0045abe
@@ -32,6 +32,10 @@ class AdopsReportScrapper::PopadsbuyerClient < AdopsReportScrapper::BaseClient
32
32
  response = RestClient.post "https://www.popads.net/api/report_advertiser?key=#{@secret}&zone=#{time_zone_id}&start=#{date_str}%2000%3A00&end=#{date_str}%2023%3A59&groups=campaign,datetime%3Aday", {}
33
33
 
34
34
  data = JSON.parse response
35
+ unless data[0]
36
+ @data = []
37
+ return
38
+ end
35
39
  data = data['rows']
36
40
  header = data[0].keys
37
41
  @data = [header]
@@ -47,6 +51,10 @@ class AdopsReportScrapper::PopadsbuyerClient < AdopsReportScrapper::BaseClient
47
51
  response = RestClient.post "https://www.popads.net/api/report_advertiser?key=#{@secret}&zone=#{time_zone_id}&start=#{date_str}%2000%3A00&end=#{date_str}%2023%3A59&groups=datetime%3Ahour", {}
48
52
 
49
53
  data = JSON.parse response
54
+ unless data[0]
55
+ @data = []
56
+ return
57
+ end
50
58
  data = data['rows']
51
59
  header = data[0].keys
52
60
  @data = [header]
@@ -1,3 +1,3 @@
1
1
  module AdopsReportScrapper
2
- VERSION = "0.2.25"
2
+ VERSION = "0.2.26"
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.25
4
+ version: 0.2.26
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-11 00:00:00.000000000 Z
11
+ date: 2017-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httpclient