bing-content-api 0.1.0 → 0.2.0

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: dbbc646639a812235ba709b64c5245fb139537dd
4
- data.tar.gz: e3fe5352ee776e9ad81396959624fdadf7cfca73
3
+ metadata.gz: 4062aa9ffde9f2910d34254db12df2c1d3b78a01
4
+ data.tar.gz: 662161cddc06d147f641b9227e7960c55289743d
5
5
  SHA512:
6
- metadata.gz: dd90f22b8b2099a295d11bca44732e340dce86e9ebcc22b024ec134dd68ec2e2d4d9ba79d6ccd1f11879b92e62028a920e7fc0240334352c01a55d45586a2335
7
- data.tar.gz: 7fa756165368b40e81bf5e7c93291047dcc0678ece2db754df6df79ab714c94a5e13eabb3e098279ac1fae4e20c043117e37d3356e0f1bc00c5748ff58b0a84c
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
- refresh_token=auth)
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.runBatch(batch)
82
+ response1 = bing_client.run_batch(batch)
79
83
  ```
80
84
 
81
85
  Let's see what's in the catalogue:
@@ -34,7 +34,7 @@ module Bing
34
34
  self.refresh_token = @token.refresh_token
35
35
  end
36
36
 
37
- def runBatch(batch)
37
+ def run_batch(batch)
38
38
  batch_processor = Bing::Content::Api::BatchProcessor.new(connector)
39
39
  batch_processor.execute(batch)
40
40
  end
@@ -1,7 +1,7 @@
1
1
  module Bing
2
2
  module Content
3
3
  module Api
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
6
6
  end
7
7
  end
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.1.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-27 00:00:00.000000000 Z
11
+ date: 2017-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler