ebay-ruby 0.3.2 → 0.3.3

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
  SHA256:
3
- metadata.gz: 73f278dbdda87fd6d0e8a00df1201f53e5bbde96aef3ee4fb9aecf732d2a20f5
4
- data.tar.gz: 6b4c462a508393a25d1e4961cfffb022d70982cfe64ca31009f83680f88565f1
3
+ metadata.gz: f75e5710d5dc86f3f0a83ec943b90ec3b5aa318be568163accba7ce326adb2a2
4
+ data.tar.gz: 223f627ad8321defd29a21fce8e1083eecb3b8447b5962d448ad51152d9b0dc1
5
5
  SHA512:
6
- metadata.gz: 42515946f5c4c0fd3b2d509dcd9feb4b7ebf31ad3662d376c58349603cd6414510e407a5b3a64cb871f1936f6bc74bb16183f250d9ef19d4145b68df3323ca3e
7
- data.tar.gz: 5456ee468e751528336a9610da8bc2f5f63d4224dd0d70efc980f3a03d474d1e918eca76ba522bfc56c854d7a5e40926277c8e6f1afd8d1469bef9f194b31161
6
+ metadata.gz: 197bc765789a721d8f678dbe0f5ed931c01743cff6699957d02a122ce6c61d73bab3046c6a15c5eb4c8ff4ebde04bd3690183fd41be8c512264393583121423b
7
+ data.tar.gz: 29bb107067f9802f8988eb4c08f991715c7de01b699694e3b38f762f61d65a562ca8c88fe9083c63e8668e6ab960e81de1b880427f582102fa3df2ca5174f3eb
data/README.md CHANGED
@@ -39,7 +39,7 @@ The Finding API provides programmatic access to the next generation search capab
39
39
  ```ruby
40
40
  require 'ebay/finding'
41
41
 
42
- request = Ebay::Finding.new
42
+ request = Ebay::Finding.new(response_data_format: 'JSON')
43
43
  response = request.find_items_by_keywords('iphone')
44
44
 
45
45
  JSON.parse(response)
@@ -56,7 +56,7 @@ The eBay Shopping API makes it easy to search for things on eBay.
56
56
  ```ruby
57
57
  require 'ebay/shopping'
58
58
 
59
- request = Ebay::Finding.new
59
+ request = Ebay::Shopping.new(response_encoding: 'JSON')
60
60
  response = request.find_products('QueryKeywords' => 'tolkien')
61
61
 
62
62
  JSON.parse(response)
@@ -69,7 +69,7 @@ The Merchandising API provides item and product recommendations that can be used
69
69
  ```ruby
70
70
  require 'ebay/merchandising'
71
71
 
72
- request = Ebay::Finding.new
72
+ request = Ebay::Merchandising.new(response_data_format: 'JSON')
73
73
  response = request.get_most_watched_items
74
74
 
75
75
  JSON.parse(response)
@@ -14,19 +14,19 @@ module Ebay
14
14
 
15
15
  self.endpoint = 'https://svcs.ebay.com/services/search/FindingService/v1'
16
16
 
17
- # @return [String, nil]
17
+ # @return [String]
18
18
  attr_reader :global_id
19
19
 
20
- # @return [String, nil]
20
+ # @return [String]
21
21
  attr_reader :message_encoding
22
22
 
23
- # @return [String, nil]
23
+ # @return [String]
24
24
  attr_reader :response_data_format
25
25
 
26
26
  # @return [String]
27
27
  attr_reader :security_appname
28
28
 
29
- # @return [String, nil]
29
+ # @return [String]
30
30
  attr_reader :service_version
31
31
 
32
32
  # Returns a Finding API request instance
@@ -38,7 +38,7 @@ module Ebay
38
38
  # @param [String] security_appname
39
39
  # @param [String] service_version
40
40
  def initialize(global_id: nil, message_encoding: nil,
41
- response_data_format: 'JSON',
41
+ response_data_format: nil,
42
42
  security_appname: Config.app_id, service_version: nil)
43
43
  @global_id = global_id
44
44
  @message_encoding = message_encoding
@@ -17,13 +17,13 @@ module Ebay
17
17
  # @return [String]
18
18
  attr_reader :consumer_id
19
19
 
20
- # @return [String, nil]
20
+ # @return [String]
21
21
  attr_reader :global_id
22
22
 
23
- # @return [String, nil]
23
+ # @return [String]
24
24
  attr_reader :response_data_format
25
25
 
26
- # @return [String, nil]
26
+ # @return [String]
27
27
  attr_reader :service_version
28
28
 
29
29
  # Returns a Finding API request instance
@@ -33,7 +33,7 @@ module Ebay
33
33
  # @param [String] response_data_format
34
34
  # @param [String] service_version
35
35
  def initialize(consumer_id: Config.app_id, global_id: nil,
36
- response_data_format: 'JSON', service_version: nil)
36
+ response_data_format: nil, service_version: nil)
37
37
  @consumer_id = consumer_id
38
38
  @global_id = global_id
39
39
  @response_data_format = response_data_format
@@ -37,7 +37,7 @@ module Ebay
37
37
  #
38
38
  # @return [HTTP::Response]
39
39
  def request
40
- HTTP.basic_auth(user: app_id, pass: cert_id)
40
+ http.basic_auth(user: app_id, pass: cert_id)
41
41
  .post(endpoint, form: payload)
42
42
  end
43
43
 
@@ -16,25 +16,25 @@ module Ebay
16
16
  # @return [String]
17
17
  attr_reader :app_id
18
18
 
19
- # @return [String, nil]
19
+ # @return [String]
20
20
  attr_reader :response_encoding
21
21
 
22
- # @return [String, nil]
22
+ # @return [String]
23
23
  attr_reader :site_id
24
24
 
25
25
  # @return [String]
26
26
  attr_reader :version
27
27
 
28
- # @return [String, nil]
28
+ # @return [String]
29
29
  attr_reader :version_handling
30
30
 
31
- # @return [String, nil]
31
+ # @return [String]
32
32
  attr_reader :tracking_id
33
33
 
34
- # @return [String, nil]
34
+ # @return [String]
35
35
  attr_reader :tracking_partner_code
36
36
 
37
- # @return [String, nil]
37
+ # @return [String]
38
38
  attr_reader :affiliate_user_id
39
39
 
40
40
  # Returns a Finding API request instance
@@ -47,7 +47,7 @@ module Ebay
47
47
  # @param [String] tracking_id
48
48
  # @param [String] tracking_partner_code
49
49
  # @param [String] affiliate_user_id
50
- def initialize(app_id: Config.app_id, response_encoding: 'JSON',
50
+ def initialize(app_id: Config.app_id, response_encoding: nil,
51
51
  site_id: nil, version: '1119',
52
52
  version_handling: nil, tracking_id: nil,
53
53
  tracking_partner_code: nil, affiliate_user_id: nil)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ebay
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ebay-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-17 00:00:00.000000000 Z
11
+ date: 2020-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: http