blurb 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/lib/blurb/report.rb +28 -1
- data/lib/blurb/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: 95515276b7058a1f6ab23991cc605a9294afa58c
|
4
|
+
data.tar.gz: f21e7906747788b74888e83e407bf5fe10da5608
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e703d76700f42cbbc5999fa42e28652f4daab46a0740342045b5e2080a6f2e504eb0e9841cc13c9a1efeb5fb7373d4b1d482d8efaa7afb4d6187f12b841a87cc
|
7
|
+
data.tar.gz: 103d9d1ccc450e53cefa5de366eadf9e06b5ee97b4b13249548f1ba5f0e969c8df633b6d90fc79b5d66361c363e707223258dadc0e075dc3fe2cd87b20288531
|
data/README.md
CHANGED
data/lib/blurb/report.rb
CHANGED
@@ -4,6 +4,7 @@ module Blurb
|
|
4
4
|
AD_GROUPS = "adGroups"
|
5
5
|
KEYWORDS = "keywords"
|
6
6
|
PRODUCT_ADS = "productAds"
|
7
|
+
ASINS = "asins"
|
7
8
|
SPONSORED_PRODUCTS = "sp"
|
8
9
|
SPONSORED_BRANDS = "hsa"
|
9
10
|
|
@@ -21,7 +22,15 @@ module Blurb
|
|
21
22
|
|
22
23
|
api_params["segment"] = params["segment"] if params["segment"]
|
23
24
|
|
24
|
-
|
25
|
+
if params["recordType"] == ASINS
|
26
|
+
request_url = "/v2/#{ASINS}/report"
|
27
|
+
api_params["campaignType"] = 'sponsoredProducts' if params["campaignType"] == SPONSORED_PRODUCTS
|
28
|
+
raise ArgumentError.new("ASIN report is not supported for Sponsored Brands") if params["campaignType"] == SPONSORED_BRANDS
|
29
|
+
else
|
30
|
+
request_url = "/v2/#{params["campaignType"]}/#{params["recordType"]}/report"
|
31
|
+
end
|
32
|
+
|
33
|
+
post_request(request_url, api_params)
|
25
34
|
end
|
26
35
|
|
27
36
|
def self.status(report_id, opts = {})
|
@@ -89,6 +98,24 @@ module Blurb
|
|
89
98
|
"attributedConversions14dSameSKU"
|
90
99
|
].join(",") if record_type == KEYWORDS
|
91
100
|
elsif campaign_type == SPONSORED_PRODUCTS
|
101
|
+
return [
|
102
|
+
"campaignName",
|
103
|
+
"campaignId",
|
104
|
+
"adGroupId",
|
105
|
+
"adGroupName",
|
106
|
+
"asin",
|
107
|
+
"otherAsin",
|
108
|
+
"sku",
|
109
|
+
"currency",
|
110
|
+
"attributedUnitsOrdered1dOtherSKU",
|
111
|
+
"attributedUnitsOrdered7dOtherSKU",
|
112
|
+
"attributedUnitsOrdered14dOtherSKU",
|
113
|
+
"attributedUnitsOrdered30dOtherSKU",
|
114
|
+
"attributedSales1dOtherSKU",
|
115
|
+
"attributedSales7dOtherSKU",
|
116
|
+
"attributedSales14dOtherSKU",
|
117
|
+
"attributedSales30dOtherSKU"
|
118
|
+
].join(",") if record_type == ASINS
|
92
119
|
return [
|
93
120
|
"bidPlus",
|
94
121
|
"campaignName",
|
data/lib/blurb/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blurb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dlbunker
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|