ebay 0.6.0 → 0.7.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.
data/README CHANGED
@@ -4,8 +4,6 @@
4
4
  eBay4R is a Ruby wrapper for eBay's Web Services SOAP API (v449). Emphasis is
5
5
  on ease of use and small footprint.
6
6
 
7
- <b>This code is currently beta</b>.
8
-
9
7
  Please report bugs and other problems, see "Author" section at the bottom.
10
8
 
11
9
  Current releases and CVS snapshots can be downloaded from:
@@ -53,7 +51,7 @@ variable)
53
51
 
54
52
  * For the latest release with no fuss (previous download not required):
55
53
 
56
- gem install -r ebay4r
54
+ gem install -r ebay
57
55
 
58
56
  === CVS
59
57
 
@@ -375,4 +373,4 @@ You should have received a copy of the GNU General Public License along with
375
373
  eBay4R; if not, write to the Free Software Foundation, Inc., 51 Franklin
376
374
  Street, Fifth Floor, Boston, MA 02110-1301, USA
377
375
 
378
- $Id: README,v 1.16 2006/04/24 05:51:18 garrydolley Exp $
376
+ $Id: README,v 1.17 2006/05/11 02:34:44 garrydolley Exp $
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # $Id: get_category_features.rb,v 1.1 2006/04/30 07:37:52 garrydolley Exp $
3
+
4
+ $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
5
+
6
+ require 'eBayAPI'
7
+
8
+ #
9
+ # Example of GetCategoryFeatures call
10
+ #
11
+
12
+ # Put your credentials in this file
13
+ load('myCredentials.rb')
14
+
15
+ # Create new eBay caller object. Omit last argument to use live platform.
16
+ eBay = EBay::API.new($authToken, $devId, $appId, $certId, :sandbox => true)
17
+
18
+ # Call "GetCategoryFeatures"
19
+ resp = eBay.GetCategoryFeatures(:DetailLevel => 'ReturnAll', # Return all available info
20
+ :CategoryID => '1',
21
+ :FeatureID => 'ListingDurations') # Tell us about listing durations
22
+
23
+ # Report results
24
+
25
+ durationHash = {}
26
+
27
+ [resp.featureDefinitions.listingDurations.listingDuration].flatten.each do |ld|
28
+ durationHash[ld.xmlattr_durationSetID] = ld.duration
29
+ end
30
+
31
+ puts "Site wide defaults for listing durations given listing type:\n\n"
32
+
33
+ [resp.siteDefaults.listingDuration].flatten.each do |duration|
34
+ puts duration.xmlattr_type # This is an example of how we read an XML attribute, just prepend "xmlattr_" to the name
35
+ [durationHash[duration]].flatten.each do |c|
36
+ puts " " + c
37
+ end
38
+ end
@@ -0,0 +1,39 @@
1
+ #!/usr/bin/env ruby
2
+ # $Id: get_ebay_details.rb,v 1.1 2006/05/01 09:32:17 garrydolley Exp $
3
+
4
+ $:.unshift File.join(File.dirname(__FILE__), "..", "lib")
5
+
6
+ require 'eBayAPI'
7
+
8
+ #
9
+ # Example of GeteBayDetails call
10
+ #
11
+
12
+ # Put your credentials in this file
13
+ load('myCredentials.rb')
14
+
15
+ # Create new eBay caller object. Omit last argument to use live platform.
16
+ eBay = EBay::API.new($authToken, $devId, $appId, $certId, :sandbox => true)
17
+
18
+ # Call "GeteBayDetails"
19
+ resp = eBay.GeteBayDetails(:DetailName => ['ShippingLocationDetails', 'ShippingServiceDetails'])
20
+
21
+ # Report results
22
+
23
+ if resp.respond_to? 'shippingLocationDetails'
24
+ puts "Seller Ship-To choices:\n\n"
25
+
26
+ [resp.shippingLocationDetails].flatten.each do |s|
27
+ puts s.shippingLocation + ": " + s.description
28
+ end
29
+
30
+ puts "\n"
31
+ end
32
+
33
+ if resp.respond_to? 'shippingServiceDetails'
34
+ puts "Shipping service codes:\n\n"
35
+
36
+ [resp.shippingServiceDetails].flatten.each do |s|
37
+ puts s.shippingService + ": " + s.description + " (" + s.shippingServiceID + ")"
38
+ end
39
+ end
@@ -1,5 +1,5 @@
1
1
  #--
2
- # $Id: eBayAPI.rb,v 1.28 2006/03/10 02:35:18 garrydolley Exp $
2
+ # $Id: eBayAPI.rb,v 1.30 2006/05/21 16:54:09 garrydolley Exp $
3
3
  #
4
4
  # Copyright (c) 2005,2006 Garry C. Dolley
5
5
  #
@@ -93,8 +93,13 @@ class API
93
93
  EBay::assign_args(request, args_hash)
94
94
  EBay::fix_case_down(call_name)
95
95
 
96
+ verbose_obj_save = $VERBOSE
97
+ $VERBOSE = nil # Suppress "warning: peer certificate won't be verified in this SSL session"
98
+
96
99
  resp = eval("service.#{call_name}(request)")
97
100
 
101
+ $VERBOSE = verbose_obj_save # Restore verbosity to previous state
102
+
98
103
  # Handle eBay Application-level error
99
104
  if resp.ack == "Failure"
100
105
  err_string = ''
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: ebay
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.6.0
7
- date: 2006-04-23 00:00:00 -07:00
6
+ version: 0.7.0
7
+ date: 2006-07-22 00:00:00 -07:00
8
8
  summary: "eBay4R is a Ruby wrapper for eBay's Web Services SOAP API. Emphasis is on ease
9
9
  of use and small footprint."
10
10
  require_paths:
@@ -39,6 +39,7 @@ files:
39
39
  - examples/revise_item.rb
40
40
  - examples/get_notification_preferences.rb
41
41
  - examples/hello_world.rb
42
+ - examples/get_category_features.rb
42
43
  - examples/get_account.rb
43
44
  - examples/get_categories.rb
44
45
  - examples/get_item.rb
@@ -46,6 +47,7 @@ files:
46
47
  - examples/get_suggested_categories.rb
47
48
  - examples/add_item.rb
48
49
  - examples/get_feedback.rb
50
+ - examples/get_ebay_details.rb
49
51
  - lib/eBayAPI.rb
50
52
  - lib/eBay.rb
51
53
  - lib/RequesterCredentialsHandler.rb