blurb 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +45 -0
- data/lib/blurb/snapshot.rb +9 -0
- data/lib/blurb/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4dbb2bb4d310954fc88eb34aa67d42855edc270
|
4
|
+
data.tar.gz: e8875b313e4ed401c7187aa7f2e8287c076069c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc4a236ed208b06b0873869fadaaf1c6d18c8c02f8c259e5eae570ba10e44c29c3de09aea2862c10dcc184092303c47eb4e7a24b057fc993687bd6eff4bd17b7
|
7
|
+
data.tar.gz: 6431425442c125f580a44ad34155ab374dc7f50e8d1327de26d17ee090c1909f8b4c31dcfb55ad16f0b86a97d739288a2f64f001b14eeada704dd968da638291
|
data/README.md
CHANGED
@@ -184,6 +184,51 @@ Blurb::Report::AD_GROUPS
|
|
184
184
|
Blurb::Report::PRODUCT_ADS
|
185
185
|
```
|
186
186
|
|
187
|
+
Check report status
|
188
|
+
|
189
|
+
```ruby
|
190
|
+
Blurb::Report.status(report_id)
|
191
|
+
```
|
192
|
+
|
193
|
+
Download report file content
|
194
|
+
|
195
|
+
```ruby
|
196
|
+
Blurb::Report.download(report_location_url)
|
197
|
+
```
|
198
|
+
|
199
|
+
### Snapshots
|
200
|
+
Request a snapshot
|
201
|
+
|
202
|
+
```ruby
|
203
|
+
payload_response = Blurb::Snapshot.create({
|
204
|
+
"recordType" => Blurb::Snapshot::KEYWORDS,
|
205
|
+
"stateFilter" => "enabled,paused,archived"
|
206
|
+
})
|
207
|
+
```
|
208
|
+
|
209
|
+
Report record types are
|
210
|
+
|
211
|
+
```ruby
|
212
|
+
Blurb::Snapshot::KEYWORDS
|
213
|
+
Blurb::Snapshot::CAMPAIGNS
|
214
|
+
Blurb::Snapshot::AD_GROUPS
|
215
|
+
Blurb::Snapshot::PRODUCT_ADS
|
216
|
+
Blurb::Snapshot::NEGATIVE_KEYWORDS
|
217
|
+
Blurb::Snapshot::CAMPAIGN_NEGATIVE_KEYWORDS
|
218
|
+
```
|
219
|
+
|
220
|
+
Check snapshot status
|
221
|
+
|
222
|
+
```ruby
|
223
|
+
Blurb::Snapshot.status(snapshot_id)
|
224
|
+
```
|
225
|
+
|
226
|
+
Download snapshot file content
|
227
|
+
|
228
|
+
```ruby
|
229
|
+
Blurb::Snapshot.download(snapshot_location_url)
|
230
|
+
```
|
231
|
+
|
187
232
|
### Suggested Keywords
|
188
233
|
Suggestions by ASIN
|
189
234
|
|
data/lib/blurb/snapshot.rb
CHANGED
@@ -16,5 +16,14 @@ module Blurb
|
|
16
16
|
"stateFilter" => params["stateFilter"]
|
17
17
|
})
|
18
18
|
end
|
19
|
+
|
20
|
+
def self.status(snapshot_id, opts = {})
|
21
|
+
get_request("/v1/snapshots/#{snapshot_id}")
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.download(location, opts = {})
|
25
|
+
opts.merge!({:full_path => true, :gzip => true, :no_token => true})
|
26
|
+
get_request(location, opts)
|
27
|
+
end
|
19
28
|
end
|
20
29
|
end
|
data/lib/blurb/version.rb
CHANGED