|
| 1 | += ebay_shopping |
| 2 | + |
| 3 | +* FIX (url) |
| 4 | + |
| 5 | +== DESCRIPTION: |
| 6 | + |
| 7 | +Ebay_Shopping Plugin |
| 8 | +=================== |
| 9 | + |
| 10 | +The ebay_shopping plugin is a RubyonRails library for Ebay's Shopping API (http://developer.ebay.com/products/shopping/). |
| 11 | +Unlike the trading API (http://developer.ebay.com/products/trading/), the shopping API is only for retrieval of information, not |
| 12 | +for posting items, or bidding on them. |
| 13 | + |
| 14 | +If you need that sort of thing, check out Cody Fauser's gem for the trading API (http://code.google.com/p/ebay/). If you don't, |
| 15 | +the Shopping API is simpler, leaner, and quite a bit faster too. |
| 16 | + |
| 17 | +Ebay_Shopping was developed by Chris Taggart for Autopendium :: Stuff about old cars (http://autopendium.com), a classic car |
| 18 | +community site. It's still in development, and news of updates will be posted at http://pushrod.wordpress.com |
| 19 | + |
| 20 | +Installation |
| 21 | +============ |
| 22 | + |
| 23 | +To install, simply run the usual: script/plugin install http://ebay-shopping.googlecode.com/svn/trunk/ ebay_shopping |
| 24 | + |
| 25 | +Then from the root of your rails app run ruby vendor/plugins/ebay_shopping/install.rb. |
| 26 | + |
| 27 | +This will copy a basic configuration file into your app's config directory. This is where |
| 28 | +you put your ebay settings (Ebay Application id, affiliate info, etc). |
| 29 | + |
| 30 | +Basic usage |
| 31 | +=========== |
| 32 | + |
| 33 | +Then from your rails app, construct a new request ebay request: |
| 34 | + |
| 35 | +request = EbayShopping::Request.new(:find_items, {:query_keywords => "chevrolet camaro"}) # use "ruby-ized" version of Ebay API calls and params |
| 36 | + |
| 37 | +response = request.response |
| 38 | + |
| 39 | +response.total_items # => 7081 |
| 40 | + |
| 41 | +items_for_sale = response.items |
| 42 | + |
| 43 | +items_for_sale.first.title # => "Chevrolet Camaro" |
| 44 | + |
| 45 | +items_for_sale.first.view_item_url_for_natural_search # => "http://cgi.ebay.com/Chevrolet-Camaro_W0QQitemZ290197239377QQcategoryZ6161QQcmdZViewItemQQ" |
| 46 | + |
| 47 | +items_for_sale.first.gallery_url # => "http://thumbs.ebaystatic.com/pict/290197239377.jpg" |
| 48 | + |
| 49 | +items_for_sale.first.converted_current_price.to_s # => "$38000.00" |
| 50 | + |
| 51 | +...etc |
| 52 | + |
| 53 | +For more methods and more details see the test suite, the comments with the class and method definitions, or wait for me to write more stuff. |
| 54 | +== FEATURES/PROBLEMS: |
| 55 | + |
| 56 | +* FIX (list of features or problems) |
| 57 | + |
| 58 | +== SYNOPSIS: |
| 59 | + |
| 60 | + FIX (code sample of usage) |
| 61 | + |
| 62 | +== REQUIREMENTS: |
| 63 | + |
| 64 | +* FIX (list of requirements) |
| 65 | + |
| 66 | +== INSTALL: |
| 67 | + |
| 68 | +* FIX (sudo gem install, anything else) |
| 69 | + |
| 70 | +== LICENSE: |
| 71 | + |
| 72 | +(The MIT License) |
| 73 | + |
| 74 | +Copyright (c) 2008 FIX |
| 75 | + |
| 76 | +Permission is hereby granted, free of charge, to any person obtaining |
| 77 | +a copy of this software and associated documentation files (the |
| 78 | +'Software'), to deal in the Software without restriction, including |
| 79 | +without limitation the rights to use, copy, modify, merge, publish, |
| 80 | +distribute, sublicense, and/or sell copies of the Software, and to |
| 81 | +permit persons to whom the Software is furnished to do so, subject to |
| 82 | +the following conditions: |
| 83 | + |
| 84 | +The above copyright notice and this permission notice shall be |
| 85 | +included in all copies or substantial portions of the Software. |
| 86 | + |
| 87 | +THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, |
| 88 | +EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF |
| 89 | +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. |
| 90 | +IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY |
| 91 | +CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, |
| 92 | +TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE |
| 93 | +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
0 commit comments