bing-content-api 0.1.0 → 0.2.0
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 +6 -2
- data/lib/bing/content/api/client.rb +1 -1
- data/lib/bing/content/api/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: 4062aa9ffde9f2910d34254db12df2c1d3b78a01
|
|
4
|
+
data.tar.gz: 662161cddc06d147f641b9227e7960c55289743d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2bd9e62b3774b1b5e2e625ba79ecce0a92a59bc31802154eccd4fc3bbb71754d891bb165c3a6dd6d80e2e7b09cb447eeb1e3eb43723bcfe08d3a35acffe28894
|
|
7
|
+
data.tar.gz: f8ae772b6626a0831dbb162302de38cd82abbbb26dc8944fff3eb659daf6ac658777c2b0ecd708449dd90ca0f6a13cf04859049e86f533e27b9d8cfccbffc60e
|
data/README.md
CHANGED
|
@@ -33,12 +33,15 @@ Unfortunately, that's a process that requires interactive user
|
|
|
33
33
|
intervention. Once you've got a refresh token though, you shouldn't
|
|
34
34
|
need to worry about manual intervention any more.
|
|
35
35
|
|
|
36
|
+
The catalogue ID is optional.
|
|
37
|
+
|
|
36
38
|
```ruby
|
|
37
39
|
auth = retrieve_my_saved_token
|
|
38
40
|
bing_client = Bing::Content::Api::Client.new(APPLICATION_ID,
|
|
39
41
|
DEVELOPER_TOKEN,
|
|
40
42
|
MERCHANT_ID_STAGING,
|
|
41
|
-
|
|
43
|
+
auth,
|
|
44
|
+
catalogue_id)
|
|
42
45
|
```
|
|
43
46
|
|
|
44
47
|
Instantiating the `Client` class will automatically fetch a refresh
|
|
@@ -47,6 +50,7 @@ to do something like the following:
|
|
|
47
50
|
|
|
48
51
|
```ruby
|
|
49
52
|
puts bing_client.generate_user_authorisation_url
|
|
53
|
+
# Visit the URL printed, click all the things, and paste the redirect URL in here:
|
|
50
54
|
code = gets.strip
|
|
51
55
|
bing_client.fetch_token_with_code!(code)
|
|
52
56
|
```
|
|
@@ -75,7 +79,7 @@ Now, submit it to the store:
|
|
|
75
79
|
```ruby
|
|
76
80
|
batch = Bing::Content::Api::Batch.new()
|
|
77
81
|
batch.add_insertions([product(1)])
|
|
78
|
-
response1 = bing_client.
|
|
82
|
+
response1 = bing_client.run_batch(batch)
|
|
79
83
|
```
|
|
80
84
|
|
|
81
85
|
Let's see what's in the catalogue:
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bing-content-api
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.2.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Paul David
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-04-
|
|
11
|
+
date: 2017-04-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|