adops_report_scrapper 0.1.24 → 0.1.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: 1ef9379e7a810f802c7f741f4d44aa61c9354de4
4
- data.tar.gz: 7ea5c8aafab042ac43b344723c11598cddb75834
3
+ metadata.gz: 4b83d70d9b8f77f02bd8e9a931aa1f9c6f7f61a2
4
+ data.tar.gz: 8909ff5d9a50439dfcf096217d751ebebbbc46d8
5
5
  SHA512:
6
- metadata.gz: 43ee246ae6835df0bb846f00c9e9086efb34239defaa9dce2b8e83e339be5185b6292a1d7c5c9a39fd3f7fe0d5868bc8467afd87e7e6ac149cfeaa0fd6e630de
7
- data.tar.gz: bc633303cb0745ab0d97ad4f59acc6d5f6e33e766acfc25a8231255c2b34d17e055da1c2392bea3c85960e0b2a4bcc580b4ef4ac789102fbbde291b4fc55685a
6
+ metadata.gz: 9f7804eedfbd3a53f23a33bc89be76cd6559d7943a868f1fd62f903006b1f8208d7781482253277a3eae809575254e79a81dfe1e3f5fbd20601cb00f0b97abc7
7
+ data.tar.gz: 73323f7586b0e6a0ff38cff7eda26c2762f690cb0ff82c9b03a4deac327d4f472b79a9c48c275b6f052405bb884392b61e97280e34202e8876f359e99ebcc366
data/CHANGELOG CHANGED
@@ -1,5 +1,8 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.1.25
4
+ reduce sonobi country number to fix it
5
+
3
6
  ## 0.1.24
4
7
  improve rhythmone via using api
5
8
 
@@ -60,7 +60,7 @@ class AdopsReportScrapper::SonobiClient < AdopsReportScrapper::BaseClient
60
60
 
61
61
  report_body = {
62
62
  '_userid': @userid,
63
- '_country' => is_us ? 'US' : 'AF,AX,AL,DZ,AS,AD,AO,AI,AQ,AG,AR,AM,AW,AP,AU,AT,AZ,BS,BH,BD,BB,BY,BE,BZ,BJ,BM,BT,BO,BA,BW,BV,BR,IO,BN,BG,BF,BI,KH,CM,CA,CV,KY,CF,TD,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MD,MC,MN,ME,MS,MA,MZ,MM,NA,NR,NP,NL,AN,NC,NZ,NI,NE,NG,NU,NF,MP,NO,OM,PK,PW,PS,PA,PG,PY,PE,PH,PN,PL,PT,PR,QA,RE,RO,RU,RW,SH,KN,LC,PM,VC,WS,SM,ST,SA,SN,RS,SC,SL,SG,SK,SI,SB,SO,ZA,GS,ES,LK,SD,SR,SJ,SZ,SE,CH,SY,TW,TJ,TZ,TH,TL,TG,TK,TO,TT,TN,TR,TM,TC,TV,UG,UA,AE,GB,UM,UY,UZ,VU,VE,VN,VG,VI,WF,EH,YE,ZM,ZW',
64
64
  'groupby' => 'day',
65
65
  'row_per' => '_date,_placementid,_siteid',
66
66
  'columns' => '_date,_placementid_name,_siteid_name,_impression_count,_impression_count_viewed,_impression_count_clicked,_unfilled_impressions,_revenue,_ecpm,_device_type,_placementid,_siteid',
@@ -68,6 +68,7 @@ class AdopsReportScrapper::SonobiClient < AdopsReportScrapper::BaseClient
68
68
  '__column_info' => '[{\"name\":\"_date\",\"label\":\"Date\",\"no_limit\":true,\"tip\":\"Shows+the+date+that+impressions+were+served+on\"},{\"name\":\"_placementid_name\",\"label\":\"Placement\",\"tip\":\"Shows+the+Placement+name+that+impressions+were+served+on\"},{\"name\":\"_siteid_name\",\"label\":\"Site\",\"tip\":\"Shows+the+name+of+the+site+that+impressions+were+served+on\"},{\"name\":\"_impression_count\",\"label\":\"Impressions\",\"format\":true,\"tip\":\"The+number+of+impressions+that+were+served\"},{\"name\":\"_impression_count_viewed\",\"label\":\"Viewable+Impressions\",\"format\":true,\"tip\":\"The+number+of+times+that+the+ad+was+viewed\"},{\"name\":\"_impression_count_clicked\",\"label\":\"Clicks\",\"format\":true,\"tip\":\"The+number+of+clicks+that+were+recorded\"},{\"name\":\"_unfilled_impressions\",\"label\":\"Unfilled+Impressions\",\"format\":true,\"tip\":\"The+number+of+impressions+could+not+be+served+due+to+ad+server+decisioning\"},{\"name\":\"_revenue\",\"label\":\"Revenue\",\"format\":\"currency\",\"pre\":\"$\",\"tip\":\"Gross+revenue+of+impressions+served\"},{\"name\":\"_ecpm\",\"label\":\"Delivered+CPM\",\"format\":\"currency\",\"pre\":\"$\",\"tip\":\"Average+CPM+of+impressions+served\"},{\"name\":\"_device_type\",\"label\":\"Device+Type\",\"tip\":\"Device+Types+include:+Desktop,+Mobile\"}]'
69
69
  }
70
70
 
71
+ byebug
71
72
  response = @client.post('https://jetstream.sonobi.com/public/', cm: 'report.request', key: @key, code: @code, _report: report_body.to_json, _report_type: 'publisher_report', _report_origin: 'publisher_reporting', _range: 'custom', _range_start_date: date_str, _range_end_date: date_str)
72
73
  report = JSON.parse response.body
73
74
  report_id = report['package']['_reportid']
@@ -1,3 +1,3 @@
1
1
  module AdopsReportScrapper
2
- VERSION = "0.1.24"
2
+ VERSION = "0.1.25"
3
3
  end
data/secret.sample.yml CHANGED
@@ -93,3 +93,7 @@ adtomation:
93
93
  rhythmone:
94
94
  login: ------
95
95
  secret: ------
96
+ options:
97
+ client_id: ------
98
+ client_secret: ------
99
+ publisher_id: ------
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: adops_report_scrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.24
4
+ version: 0.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stayman Hou