ebay-ruby 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 61ef56a95ed5175f1197fa237499c3b3364ee853
4
+ data.tar.gz: 02f74d8bf1481d2bc5f3c0a7d1f4310fdcaafabb
5
+ SHA512:
6
+ metadata.gz: ba7219e51106250f5140119e225b38bdefd9ae446ccd03f262eb201a3d9d4d3caff8cf5a950ac7f175d2a36666d2f08d06307190a62f28cc1d30526fd8439d70
7
+ data.tar.gz: 97bdcde5ade59131b28b11e425ff4d0d6f755f119d285ffb563912bd7c6c495b0fc6a142322e01a39d4c9166a61a1cb8e7f2eaf793d0943a24570ea52f038844
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ bin
5
+ pkg
data/.travis.yml ADDED
@@ -0,0 +1,6 @@
1
+ rvm:
2
+ - 1.9.3
3
+ - 2.0.0
4
+ - 2.1
5
+ - jruby-19mode
6
+ - rbx-2
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source 'http://rubygems.org'
2
+ gemspec
data/README.md ADDED
@@ -0,0 +1,16 @@
1
+ # ebay-ruby
2
+
3
+ A wrapper to the eBay APIs in Ruby
4
+
5
+ ```ruby
6
+ require 'ebay/finding'
7
+
8
+ finding = Ebay::Finding.new
9
+ params = {
10
+ 'GLOBAL-ID' => 'EBAY-US',
11
+ 'OPERATION-NAME' => 'findItemsByKeywords',
12
+ 'keywords' => 'minimalism'
13
+ }
14
+ parser = finding.get(query: params)
15
+ parser.parse
16
+ ```
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rake/testtask'
3
+
4
+ Rake::TestTask.new do |t|
5
+ t.libs.push('lib', 'test')
6
+ t.test_files = FileList['test/**/test_*.rb']
7
+ end
8
+
9
+ task default: [:test]
data/ebay-ruby.gemspec ADDED
@@ -0,0 +1,24 @@
1
+ $:.push File.expand_path('../lib', __FILE__)
2
+ require 'ebay/version'
3
+
4
+ Gem::Specification.new do |s|
5
+ s.name = 'ebay-ruby'
6
+ s.version = Ebay::VERSION
7
+ s.authors = ['Hakan Ensari']
8
+ s.email = ['me@hakanensari.com']
9
+ s.homepage = 'https://github.com/hakanensari/ebay-ruby'
10
+ s.summary = 'A Ruby wrapper to the eBay Web Services API'
11
+
12
+ s.add_dependency 'multi_xml', '~> 0.5.5'
13
+ s.add_dependency 'excon', '~>0.33'
14
+
15
+ s.add_development_dependency 'pry', '~> 0.9.12'
16
+ s.add_development_dependency 'rake', '~> 10.3'
17
+ s.add_development_dependency 'minitest', '~> 5.3'
18
+ s.add_development_dependency 'minitest-emoji', '~> 2.0'
19
+ s.add_development_dependency 'vcr', '~> 2.9'
20
+
21
+ s.files = `git ls-files`.split("\n")
22
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
23
+ s.require_paths = ['lib']
24
+ end
@@ -0,0 +1,11 @@
1
+ module Ebay
2
+ module Config
3
+ class << self
4
+ attr_writer :app_id
5
+
6
+ def app_id
7
+ @app_id || ENV['EBAY_APP_ID']
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,16 @@
1
+ require 'ebay/request'
2
+
3
+ module Ebay
4
+ class Finding < Request
5
+ def initialize
6
+ @host = 'svcs.ebay.com'
7
+ @path = '/services/search/FindingService/v1'
8
+ @sandbox = 'svcs.sandbox.ebay.com'
9
+ @defaults = {
10
+ headers: {
11
+ 'X-EBAY-SOA-SECURITY-APPNAME' => Config.app_id
12
+ }
13
+ }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'ebay/request'
2
+
3
+ module Ebay
4
+ class Merchandising < Request
5
+ def initialize
6
+ @host = 'svcs.ebay.com'
7
+ @path = '/MerchandisingService'
8
+ @sandbox = 'svcs.sandbox.ebay.com'
9
+ @defaults = {
10
+ headers: {
11
+ 'EBAY-SOA-CONSUMER-ID' => Config.app_id
12
+ }
13
+ }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,15 @@
1
+ require 'delegate'
2
+ require 'json'
3
+ require 'multi_xml'
4
+
5
+ module Ebay
6
+ class Parser < SimpleDelegator
7
+ def parse
8
+ if headers['Content-Type'].include?('xml')
9
+ MultiXml.parse(body)
10
+ else
11
+ JSON.parse(body)
12
+ end
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,16 @@
1
+ require 'ebay/request'
2
+
3
+ module Ebay
4
+ class Product < Request
5
+ def initialize
6
+ @host = 'svcs.ebay.com'
7
+ @path = '/services/marketplacecatalog/ProductService/v1'
8
+ @sandbox = 'svcs.sandbox.ebay.com'
9
+ @defaults = {
10
+ headers: {
11
+ 'X-EBAY-SOA-SECURITY-APPNAME' => Config.app_id
12
+ }
13
+ }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,16 @@
1
+ require 'ebay/request'
2
+
3
+ module Ebay
4
+ class ProductMetadata < Request
5
+ def initialize
6
+ @host = 'svcs.ebay.com'
7
+ @path = '/services/marketplacecatalog/ProductMetadataService/v1'
8
+ @sandbox = 'svcs.sandbox.ebay.com'
9
+ @defaults = {
10
+ headers: {
11
+ 'X-EBAY-SOA-SECURITY-APPNAME' => Config.app_id
12
+ }
13
+ }
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,21 @@
1
+ require 'excon'
2
+ require 'ebay/config'
3
+ require 'ebay/parser'
4
+
5
+ module Ebay
6
+ class Request
7
+ def sandbox!
8
+ @host = @sandbox
9
+ end
10
+
11
+ def get(opts)
12
+ Parser.new(connection.get(opts))
13
+ end
14
+
15
+ private
16
+
17
+ def connection
18
+ Excon.new("http://#{@host}#{@path}", @defaults)
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,17 @@
1
+ require 'ebay/request'
2
+
3
+ module Ebay
4
+ class Shopping < Request
5
+ def initialize
6
+ @host = 'open.api.ebay.com'
7
+ @path = '/shopping'
8
+ @sandbox = 'open.api.sandbox.ebay.com'
9
+ @defaults = {
10
+ headers: {
11
+ 'X-EBAY-API-APP-ID' => Config.app_id,
12
+ 'X-EBAY-API-VERSION' => 799
13
+ }
14
+ }
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,3 @@
1
+ module Ebay
2
+ VERSION = '0.0.1'
3
+ end
data/lib/ebay-ruby.rb ADDED
@@ -0,0 +1 @@
1
+ require 'ebay'
data/lib/ebay.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'ebay/config'
2
+ require 'ebay/finding'
3
+ require 'ebay/merchandising'
4
+ require 'ebay/product'
5
+ require 'ebay/product_metadata'
6
+ require 'ebay/shopping'
7
+
8
+ module Ebay
9
+ def self.configure
10
+ yield Config
11
+ end
12
+ end
@@ -0,0 +1,135 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://svcs.sandbox.ebay.com/services/search/FindingService/v1?GLOBAL-ID=EBAY-US&OPERATION-NAME=findItemsByKeywords&keywords=ernesto+laclau
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-EBAY-SOA-SECURITY-APPNAME:
11
+ - APP_ID
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ Server:
18
+ - Apache-Coyote/1.1
19
+ X-EBAY-SOA-SERVICE-METRICS:
20
+ - '50345688'
21
+ X-EBAY-SOA-REQUEST-ID:
22
+ - 145ed3a1-e060-a471-d300-04c0ffffe565!FindingService!10.71.29.48!v3apifindingsandboxcore[!FindItemServiceNextGen!10.71.29.48!v3apifindingsandboxcore[]]
23
+ X-EBAY-SOA-SERVICE-VERSION:
24
+ - 1.12.0
25
+ X-EBAY-SOA-LOCALE-LIST:
26
+ - en-US_US
27
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
28
+ - NONE
29
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
30
+ - XML
31
+ X-EBAY-SOA-GLOBAL-ID:
32
+ - EBAY-US
33
+ X-EBAY-SOA-OPERATION-NAME:
34
+ - findItemsByKeywords
35
+ X-EBAY-SOA-SERVICE-NAME:
36
+ - "{http://www.ebay.com/marketplace/search/v1/services}FindingService"
37
+ Content-Type:
38
+ - text/xml;charset=UTF-8
39
+ Transfer-Encoding:
40
+ - ''
41
+ Date:
42
+ - Sun, 11 May 2014 21:39:40 GMT
43
+ body:
44
+ encoding: UTF-8
45
+ string: <?xml version='1.0' encoding='UTF-8'?><findItemsByKeywordsResponse xmlns="http://www.ebay.com/marketplace/search/v1/services"><ack>Success</ack><version>1.12.0</version><timestamp>2014-05-11T21:39:40.213Z</timestamp><searchResult
46
+ count="3"><item><itemId>110108016161</itemId><title>Emancipation(s) By Laclau,
47
+ Ernesto</title><globalId>EBAY-US</globalId><subtitle>Always Save with UnbeatableSale!</subtitle><primaryCategory><categoryId>2228</categoryId><categoryName>Textbooks,
48
+ Education</categoryName></primaryCategory><viewItemURL>http://cgi.sandbox.ebay.com/Emancipation-s-Laclau-Ernesto-/110108016161</viewItemURL><paymentMethod>PayPal</paymentMethod><autoPay>false</autoPay><postalCode>08701</postalCode><location>Lakewood,NJ,USA</location><country>US</country><shippingInfo><shippingServiceCost
49
+ currencyId="USD">0.0</shippingServiceCost><shippingType>Free</shippingType><shipToLocations>US</shipToLocations><expeditedShipping>false</expeditedShipping><oneDayShippingAvailable>false</oneDayShippingAvailable><handlingTime>4</handlingTime></shippingInfo><sellingStatus><currentPrice
50
+ currencyId="USD">16.39</currentPrice><convertedCurrentPrice currencyId="USD">16.39</convertedCurrentPrice><sellingState>Active</sellingState><timeLeft>P24DT21H37M11S</timeLeft></sellingStatus><listingInfo><bestOfferEnabled>false</bestOfferEnabled><buyItNowAvailable>false</buyItNowAvailable><startTime>2012-10-13T19:11:51.000Z</startTime><endTime>2014-06-05T19:16:51.000Z</endTime><listingType>FixedPrice</listingType><gift>false</gift></listingInfo><returnsAccepted>true</returnsAccepted><condition><conditionId>1000</conditionId><conditionDisplayName>Brand
51
+ New</conditionDisplayName></condition><isMultiVariationListing>false</isMultiVariationListing><discountPriceInfo><originalRetailPrice
52
+ currencyId="USD">20.48</originalRetailPrice><pricingTreatment>STP</pricingTreatment><soldOnEbay>false</soldOnEbay><soldOffEbay>false</soldOffEbay></discountPriceInfo><topRatedListing>false</topRatedListing></item><item><itemId>110108016439</itemId><title>On
53
+ Populist Reason By Laclau, Ernesto</title><globalId>EBAY-US</globalId><subtitle>Always
54
+ Save with UnbeatableSale!</subtitle><primaryCategory><categoryId>2228</categoryId><categoryName>Textbooks,
55
+ Education</categoryName></primaryCategory><viewItemURL>http://cgi.sandbox.ebay.com/Populist-Reason-Laclau-Ernesto-/110108016439</viewItemURL><paymentMethod>PayPal</paymentMethod><autoPay>false</autoPay><postalCode>08701</postalCode><location>Lakewood,NJ,USA</location><country>US</country><shippingInfo><shippingServiceCost
56
+ currencyId="USD">0.0</shippingServiceCost><shippingType>Free</shippingType><shipToLocations>US</shipToLocations><expeditedShipping>false</expeditedShipping><oneDayShippingAvailable>false</oneDayShippingAvailable><handlingTime>4</handlingTime></shippingInfo><sellingStatus><currentPrice
57
+ currencyId="USD">21.52</currentPrice><convertedCurrentPrice currencyId="USD">21.52</convertedCurrentPrice><sellingState>Active</sellingState><timeLeft>P24DT21H37M24S</timeLeft></sellingStatus><listingInfo><bestOfferEnabled>false</bestOfferEnabled><buyItNowAvailable>false</buyItNowAvailable><startTime>2012-10-13T19:12:04.000Z</startTime><endTime>2014-06-05T19:17:04.000Z</endTime><listingType>FixedPrice</listingType><gift>false</gift></listingInfo><returnsAccepted>true</returnsAccepted><condition><conditionId>1000</conditionId><conditionDisplayName>Brand
58
+ New</conditionDisplayName></condition><isMultiVariationListing>false</isMultiVariationListing><discountPriceInfo><originalRetailPrice
59
+ currencyId="USD">27.15</originalRetailPrice><pricingTreatment>STP</pricingTreatment><soldOnEbay>false</soldOnEbay><soldOffEbay>false</soldOffEbay></discountPriceInfo><topRatedListing>false</topRatedListing></item><item><itemId>110108023405</itemId><title>Hegemony
60
+ and Socialist Strategy By Laclau, Ernesto/ Mouffe, Chantal</title><globalId>EBAY-US</globalId><subtitle>Always
61
+ Save with UnbeatableSale!</subtitle><primaryCategory><categoryId>2228</categoryId><categoryName>Textbooks,
62
+ Education</categoryName></primaryCategory><viewItemURL>http://cgi.sandbox.ebay.com/Hegemony-and-Socialist-Strategy-Laclau-Ernesto-Mouffe-Chantal-/110108023405</viewItemURL><paymentMethod>PayPal</paymentMethod><autoPay>false</autoPay><postalCode>08701</postalCode><location>Lakewood,NJ,USA</location><country>US</country><shippingInfo><shippingServiceCost
63
+ currencyId="USD">0.0</shippingServiceCost><shippingType>Free</shippingType><shipToLocations>US</shipToLocations><expeditedShipping>false</expeditedShipping><oneDayShippingAvailable>false</oneDayShippingAvailable><handlingTime>4</handlingTime></shippingInfo><sellingStatus><currentPrice
64
+ currencyId="USD">21.52</currentPrice><convertedCurrentPrice currencyId="USD">21.52</convertedCurrentPrice><sellingState>Active</sellingState><timeLeft>P24DT21H43M34S</timeLeft></sellingStatus><listingInfo><bestOfferEnabled>false</bestOfferEnabled><buyItNowAvailable>false</buyItNowAvailable><startTime>2012-10-13T19:18:14.000Z</startTime><endTime>2014-06-05T19:23:14.000Z</endTime><listingType>FixedPrice</listingType><gift>false</gift></listingInfo><returnsAccepted>true</returnsAccepted><condition><conditionId>1000</conditionId><conditionDisplayName>Brand
65
+ New</conditionDisplayName></condition><isMultiVariationListing>false</isMultiVariationListing><discountPriceInfo><originalRetailPrice
66
+ currencyId="USD">27.15</originalRetailPrice><pricingTreatment>STP</pricingTreatment><soldOnEbay>false</soldOnEbay><soldOffEbay>false</soldOffEbay></discountPriceInfo><topRatedListing>false</topRatedListing></item></searchResult><paginationOutput><pageNumber>1</pageNumber><entriesPerPage>100</entriesPerPage><totalPages>1</totalPages><totalEntries>3</totalEntries></paginationOutput><itemSearchURL>http://shop.sandbox.ebay.com/i.html?_nkw=ernesto+laclau&amp;_ddo=1&amp;_ipg=100&amp;_pgn=1</itemSearchURL></findItemsByKeywordsResponse>
67
+ http_version:
68
+ recorded_at: Sun, 11 May 2014 21:39:39 GMT
69
+ - request:
70
+ method: get
71
+ uri: http://svcs.sandbox.ebay.com/services/search/FindingService/v1?GLOBAL-ID=EBAY-US&OPERATION-NAME=findItemsByKeywords&RESPONSEENCODING=JSON&keywords=ernesto+laclau
72
+ body:
73
+ encoding: US-ASCII
74
+ string: ''
75
+ headers:
76
+ X-EBAY-SOA-SECURITY-APPNAME:
77
+ - APP_ID
78
+ response:
79
+ status:
80
+ code: 200
81
+ message:
82
+ headers:
83
+ Server:
84
+ - Apache-Coyote/1.1
85
+ X-EBAY-SOA-SERVICE-METRICS:
86
+ - '42677594'
87
+ X-EBAY-SOA-REQUEST-ID:
88
+ - 145ed3a2-2120-a471-d312-7542ffffe3c9!FindingService!10.71.29.49!v3apifindingsandboxcore[!FindItemServiceNextGen!10.71.29.49!v3apifindingsandboxcore[]]
89
+ X-EBAY-SOA-SERVICE-VERSION:
90
+ - 1.12.0
91
+ X-EBAY-SOA-LOCALE-LIST:
92
+ - en-US_US
93
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
94
+ - NONE
95
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
96
+ - XML
97
+ X-EBAY-SOA-GLOBAL-ID:
98
+ - EBAY-US
99
+ X-EBAY-SOA-OPERATION-NAME:
100
+ - findItemsByKeywords
101
+ X-EBAY-SOA-SERVICE-NAME:
102
+ - "{http://www.ebay.com/marketplace/search/v1/services}FindingService"
103
+ Content-Type:
104
+ - text/xml;charset=UTF-8
105
+ Transfer-Encoding:
106
+ - ''
107
+ Date:
108
+ - Sun, 11 May 2014 21:39:41 GMT
109
+ body:
110
+ encoding: UTF-8
111
+ string: <?xml version='1.0' encoding='UTF-8'?><findItemsByKeywordsResponse xmlns="http://www.ebay.com/marketplace/search/v1/services"><ack>Success</ack><version>1.12.0</version><timestamp>2014-05-11T21:39:41.233Z</timestamp><searchResult
112
+ count="3"><item><itemId>110108016161</itemId><title>Emancipation(s) By Laclau,
113
+ Ernesto</title><globalId>EBAY-US</globalId><subtitle>Always Save with UnbeatableSale!</subtitle><primaryCategory><categoryId>2228</categoryId><categoryName>Textbooks,
114
+ Education</categoryName></primaryCategory><viewItemURL>http://cgi.sandbox.ebay.com/Emancipation-s-Laclau-Ernesto-/110108016161</viewItemURL><paymentMethod>PayPal</paymentMethod><autoPay>false</autoPay><postalCode>08701</postalCode><location>Lakewood,NJ,USA</location><country>US</country><shippingInfo><shippingServiceCost
115
+ currencyId="USD">0.0</shippingServiceCost><shippingType>Free</shippingType><shipToLocations>US</shipToLocations><expeditedShipping>false</expeditedShipping><oneDayShippingAvailable>false</oneDayShippingAvailable><handlingTime>4</handlingTime></shippingInfo><sellingStatus><currentPrice
116
+ currencyId="USD">16.39</currentPrice><convertedCurrentPrice currencyId="USD">16.39</convertedCurrentPrice><sellingState>Active</sellingState><timeLeft>P24DT21H37M10S</timeLeft></sellingStatus><listingInfo><bestOfferEnabled>false</bestOfferEnabled><buyItNowAvailable>false</buyItNowAvailable><startTime>2012-10-13T19:11:51.000Z</startTime><endTime>2014-06-05T19:16:51.000Z</endTime><listingType>FixedPrice</listingType><gift>false</gift></listingInfo><returnsAccepted>true</returnsAccepted><condition><conditionId>1000</conditionId><conditionDisplayName>Brand
117
+ New</conditionDisplayName></condition><isMultiVariationListing>false</isMultiVariationListing><discountPriceInfo><originalRetailPrice
118
+ currencyId="USD">20.48</originalRetailPrice><pricingTreatment>STP</pricingTreatment><soldOnEbay>false</soldOnEbay><soldOffEbay>false</soldOffEbay></discountPriceInfo><topRatedListing>false</topRatedListing></item><item><itemId>110108016439</itemId><title>On
119
+ Populist Reason By Laclau, Ernesto</title><globalId>EBAY-US</globalId><subtitle>Always
120
+ Save with UnbeatableSale!</subtitle><primaryCategory><categoryId>2228</categoryId><categoryName>Textbooks,
121
+ Education</categoryName></primaryCategory><viewItemURL>http://cgi.sandbox.ebay.com/Populist-Reason-Laclau-Ernesto-/110108016439</viewItemURL><paymentMethod>PayPal</paymentMethod><autoPay>false</autoPay><postalCode>08701</postalCode><location>Lakewood,NJ,USA</location><country>US</country><shippingInfo><shippingServiceCost
122
+ currencyId="USD">0.0</shippingServiceCost><shippingType>Free</shippingType><shipToLocations>US</shipToLocations><expeditedShipping>false</expeditedShipping><oneDayShippingAvailable>false</oneDayShippingAvailable><handlingTime>4</handlingTime></shippingInfo><sellingStatus><currentPrice
123
+ currencyId="USD">21.52</currentPrice><convertedCurrentPrice currencyId="USD">21.52</convertedCurrentPrice><sellingState>Active</sellingState><timeLeft>P24DT21H37M23S</timeLeft></sellingStatus><listingInfo><bestOfferEnabled>false</bestOfferEnabled><buyItNowAvailable>false</buyItNowAvailable><startTime>2012-10-13T19:12:04.000Z</startTime><endTime>2014-06-05T19:17:04.000Z</endTime><listingType>FixedPrice</listingType><gift>false</gift></listingInfo><returnsAccepted>true</returnsAccepted><condition><conditionId>1000</conditionId><conditionDisplayName>Brand
124
+ New</conditionDisplayName></condition><isMultiVariationListing>false</isMultiVariationListing><discountPriceInfo><originalRetailPrice
125
+ currencyId="USD">27.15</originalRetailPrice><pricingTreatment>STP</pricingTreatment><soldOnEbay>false</soldOnEbay><soldOffEbay>false</soldOffEbay></discountPriceInfo><topRatedListing>false</topRatedListing></item><item><itemId>110108023405</itemId><title>Hegemony
126
+ and Socialist Strategy By Laclau, Ernesto/ Mouffe, Chantal</title><globalId>EBAY-US</globalId><subtitle>Always
127
+ Save with UnbeatableSale!</subtitle><primaryCategory><categoryId>2228</categoryId><categoryName>Textbooks,
128
+ Education</categoryName></primaryCategory><viewItemURL>http://cgi.sandbox.ebay.com/Hegemony-and-Socialist-Strategy-Laclau-Ernesto-Mouffe-Chantal-/110108023405</viewItemURL><paymentMethod>PayPal</paymentMethod><autoPay>false</autoPay><postalCode>08701</postalCode><location>Lakewood,NJ,USA</location><country>US</country><shippingInfo><shippingServiceCost
129
+ currencyId="USD">0.0</shippingServiceCost><shippingType>Free</shippingType><shipToLocations>US</shipToLocations><expeditedShipping>false</expeditedShipping><oneDayShippingAvailable>false</oneDayShippingAvailable><handlingTime>4</handlingTime></shippingInfo><sellingStatus><currentPrice
130
+ currencyId="USD">21.52</currentPrice><convertedCurrentPrice currencyId="USD">21.52</convertedCurrentPrice><sellingState>Active</sellingState><timeLeft>P24DT21H43M33S</timeLeft></sellingStatus><listingInfo><bestOfferEnabled>false</bestOfferEnabled><buyItNowAvailable>false</buyItNowAvailable><startTime>2012-10-13T19:18:14.000Z</startTime><endTime>2014-06-05T19:23:14.000Z</endTime><listingType>FixedPrice</listingType><gift>false</gift></listingInfo><returnsAccepted>true</returnsAccepted><condition><conditionId>1000</conditionId><conditionDisplayName>Brand
131
+ New</conditionDisplayName></condition><isMultiVariationListing>false</isMultiVariationListing><discountPriceInfo><originalRetailPrice
132
+ currencyId="USD">27.15</originalRetailPrice><pricingTreatment>STP</pricingTreatment><soldOnEbay>false</soldOnEbay><soldOffEbay>false</soldOffEbay></discountPriceInfo><topRatedListing>false</topRatedListing></item></searchResult><paginationOutput><pageNumber>1</pageNumber><entriesPerPage>100</entriesPerPage><totalPages>1</totalPages><totalEntries>3</totalEntries></paginationOutput><itemSearchURL>http://shop.sandbox.ebay.com/i.html?_nkw=ernesto+laclau&amp;_ddo=1&amp;_ipg=100&amp;_pgn=1</itemSearchURL></findItemsByKeywordsResponse>
133
+ http_version:
134
+ recorded_at: Sun, 11 May 2014 21:39:40 GMT
135
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,93 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://svcs.sandbox.ebay.com/MerchandisingService?GLOBAL-ID=EBAY-US&OPERATION-NAME=getMostWatchedItems&RESPONSE-DATA-FORMAT=JSON
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ EBAY-SOA-CONSUMER-ID:
11
+ - APP_ID
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ Server:
18
+ - Apache-Coyote/1.1
19
+ X-EBAY-SOA-SERVICE-METRICS:
20
+ - '7274306'
21
+ X-EBAY-SOA-REQUEST-ID:
22
+ - 145ed416-8030-a471-d5a1-2c31fff862f3!MerchandisingService!10.71.29.90!v3soa1sandboxcore[]
23
+ X-EBAY-SOA-SERVICE-VERSION:
24
+ - 1.5.0
25
+ X-EBAY-SOA-LOCALE-LIST:
26
+ - en-US_US
27
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
28
+ - NONE
29
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
30
+ - JSON
31
+ X-EBAY-SOA-GLOBAL-ID:
32
+ - EBAY-US
33
+ X-EBAY-SOA-OPERATION-NAME:
34
+ - getMostWatchedItems
35
+ X-EBAY-SOA-SERVICE-NAME:
36
+ - "{http://www.ebay.com/marketplace/services}MerchandisingService"
37
+ Content-Type:
38
+ - application/json;charset=UTF-8
39
+ Transfer-Encoding:
40
+ - ''
41
+ Date:
42
+ - Sun, 11 May 2014 21:47:37 GMT
43
+ body:
44
+ encoding: UTF-8
45
+ string: '{"getMostWatchedItemsResponse":{"ack":"Success","version":"1.5.0","timestamp":"2014-05-11T21:47:37.875Z"}}'
46
+ http_version:
47
+ recorded_at: Sun, 11 May 2014 21:47:37 GMT
48
+ - request:
49
+ method: get
50
+ uri: http://svcs.sandbox.ebay.com/MerchandisingService?GLOBAL-ID=EBAY-US&OPERATION-NAME=getMostWatchedItems
51
+ body:
52
+ encoding: US-ASCII
53
+ string: ''
54
+ headers:
55
+ EBAY-SOA-CONSUMER-ID:
56
+ - APP_ID
57
+ response:
58
+ status:
59
+ code: 200
60
+ message:
61
+ headers:
62
+ Server:
63
+ - Apache-Coyote/1.1
64
+ X-EBAY-SOA-SERVICE-METRICS:
65
+ - '7175452'
66
+ X-EBAY-SOA-REQUEST-ID:
67
+ - 145ed416-b280-a471-d5b7-9097fff8873c!MerchandisingService!10.71.29.91!v3soa1sandboxcore[]
68
+ X-EBAY-SOA-SERVICE-VERSION:
69
+ - 1.5.0
70
+ X-EBAY-SOA-LOCALE-LIST:
71
+ - en-US_US
72
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
73
+ - NONE
74
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
75
+ - XML
76
+ X-EBAY-SOA-GLOBAL-ID:
77
+ - EBAY-US
78
+ X-EBAY-SOA-OPERATION-NAME:
79
+ - getMostWatchedItems
80
+ X-EBAY-SOA-SERVICE-NAME:
81
+ - "{http://www.ebay.com/marketplace/services}MerchandisingService"
82
+ Content-Type:
83
+ - text/xml;charset=UTF-8
84
+ Transfer-Encoding:
85
+ - ''
86
+ Date:
87
+ - Sun, 11 May 2014 21:47:37 GMT
88
+ body:
89
+ encoding: UTF-8
90
+ string: <?xml version='1.0' encoding='UTF-8'?><getMostWatchedItemsResponse xmlns="http://www.ebay.com/marketplace/services"><ack>Success</ack><version>1.5.0</version><timestamp>2014-05-11T21:47:38.664Z</timestamp></getMostWatchedItemsResponse>
91
+ http_version:
92
+ recorded_at: Sun, 11 May 2014 21:47:37 GMT
93
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,101 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://svcs.sandbox.ebay.com/services/marketplacecatalog/ProductService/v1?GLOBAL-ID=EBAY-US&OPERATION-NAME=getProductDetails&productDetailsRequest.dataset=DisplayableSearchResults&productDetailsRequest.productIdentifier.ePID=83414
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-EBAY-SOA-SECURITY-APPNAME:
11
+ - APP_ID
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ Server:
18
+ - Apache-Coyote/1.1
19
+ X-EBAY-SOA-SERVICE-METRICS:
20
+ - '732529592'
21
+ X-EBAY-SOA-REQUEST-ID:
22
+ - 145ed48e-23c0-a471-d300-04c0ffffe55d!ProductService!10.71.29.48!v3apifindingsandboxcore[!CatalogService!10.71.29.78!v3mddssandboxcore[]]
23
+ X-EBAY-SOA-SERVICE-VERSION:
24
+ - 1.3.1
25
+ X-EBAY-SOA-LOCALE-LIST:
26
+ - en-US_US
27
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
28
+ - NONE
29
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
30
+ - XML
31
+ X-EBAY-SOA-GLOBAL-ID:
32
+ - EBAY-US
33
+ X-EBAY-SOA-OPERATION-NAME:
34
+ - getProductDetails
35
+ X-EBAY-SOA-SERVICE-NAME:
36
+ - "{http://www.ebay.com/marketplace/marketplacecatalog/v1/services}ProductService"
37
+ Content-Type:
38
+ - text/xml;charset=UTF-8
39
+ Transfer-Encoding:
40
+ - ''
41
+ Date:
42
+ - Sun, 11 May 2014 21:55:48 GMT
43
+ body:
44
+ encoding: UTF-8
45
+ string: <?xml version='1.0' encoding='UTF-8'?><getProductDetailsResponse xmlns="http://www.ebay.com/marketplace/marketplacecatalog/v1/services"><ack>Success</ack><version>1.3.1</version><timestamp>2014-05-11T21:55:48.635Z</timestamp><product><productIdentifier><ePID>83414</ePID></productIdentifier><stockPhotoURL><thumbnail><value>http://i.ebayimg.com/00/$T2eC16F,!y8E9s2fjE4sBRY5q7ep6Q~~_0.JPG?set_id=89040003C1</value></thumbnail><standard><value>http://i.ebayimg.com/00/$T2eC16F,!y8E9s2fjE4sBRY5q7ep6Q~~_7.JPG?set_id=89040003C1</value></standard></stockPhotoURL><productDetails><propertyName>PRODUCT_FAMILY_ID</propertyName><value><number><value>1504161</value></number></value></productDetails><productDetails><propertyName>ISBN</propertyName><value><text><value>0231056699</value></text></value></productDetails><productDetails><propertyName>Publication
46
+ Year</propertyName><value><text><value>19850000</value></text></value></productDetails><productDetails><propertyName>EAN</propertyName><value><text><value>9780231056694</value></text></value></productDetails><productDetails><propertyName>Author</propertyName><value><text><value>Gilles
47
+ Deleuze</value></text></value></productDetails><productDetails><propertyName>CP_NAME</propertyName><value><text><value>Nietzsche
48
+ and Philosophy by Gilles Deleuze (1985, Paperback)</value></text></value></productDetails><productDetails><propertyName>Format_Computed</propertyName><value><text><value>Trade
49
+ Paper</value></text></value></productDetails><productStatus><excludeForeBaySelling>false</excludeForeBaySelling><excludeForeBayReviews>false</excludeForeBayReviews><excludeForHalfSelling>false</excludeForHalfSelling></productStatus><type>Member</type></product></getProductDetailsResponse>
50
+ http_version:
51
+ recorded_at: Sun, 11 May 2014 21:55:48 GMT
52
+ - request:
53
+ method: get
54
+ uri: http://svcs.sandbox.ebay.com/services/marketplacecatalog/ProductService/v1?GLOBAL-ID=EBAY-US&OPERATION-NAME=getProductDetails&RESPONSE-DATA-FORMAT=JSON&productDetailsRequest.dataset=DisplayableSearchResults&productDetailsRequest.productIdentifier.ePID=83414
55
+ body:
56
+ encoding: US-ASCII
57
+ string: ''
58
+ headers:
59
+ X-EBAY-SOA-SECURITY-APPNAME:
60
+ - APP_ID
61
+ response:
62
+ status:
63
+ code: 200
64
+ message:
65
+ headers:
66
+ Server:
67
+ - Apache-Coyote/1.1
68
+ X-EBAY-SOA-SERVICE-METRICS:
69
+ - '261228349'
70
+ X-EBAY-SOA-REQUEST-ID:
71
+ - 145ed508-86d0-a471-d300-04c0ffffe559!ProductService!10.71.29.48!v3apifindingsandboxcore[!CatalogService!10.71.29.78!v3mddssandboxcore[]]
72
+ X-EBAY-SOA-SERVICE-VERSION:
73
+ - 1.3.1
74
+ X-EBAY-SOA-LOCALE-LIST:
75
+ - en-US_US
76
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
77
+ - NONE
78
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
79
+ - JSON
80
+ X-EBAY-SOA-GLOBAL-ID:
81
+ - EBAY-US
82
+ X-EBAY-SOA-OPERATION-NAME:
83
+ - getProductDetails
84
+ X-EBAY-SOA-SERVICE-NAME:
85
+ - "{http://www.ebay.com/marketplace/marketplacecatalog/v1/services}ProductService"
86
+ Content-Type:
87
+ - text/plain;charset=UTF-8
88
+ Transfer-Encoding:
89
+ - ''
90
+ Date:
91
+ - Sun, 11 May 2014 22:04:09 GMT
92
+ body:
93
+ encoding: UTF-8
94
+ string: '{"getProductDetailsResponse":[{"ack":["Success"],"version":["1.3.1"],"timestamp":["2014-05-11T22:04:09.463Z"],"product":[{"productIdentifier":[{"ePID":["83414"]}],"stockPhotoURL":[{"thumbnail":[{"value":["http:\/\/i.ebayimg.com\/00\/$T2eC16F,!y8E9s2fjE4sBRY5q7ep6Q~~_0.JPG?set_id=89040003C1"]}],"standard":[{"value":["http:\/\/i.ebayimg.com\/00\/$T2eC16F,!y8E9s2fjE4sBRY5q7ep6Q~~_7.JPG?set_id=89040003C1"]}]}],"productDetails":[{"propertyName":["PRODUCT_FAMILY_ID"],"value":[{"number":[{"value":["1504161"]}]}]},{"propertyName":["ISBN"],"value":[{"text":[{"value":["0231056699"]}]}]},{"propertyName":["Publication
95
+ Year"],"value":[{"text":[{"value":["19850000"]}]}]},{"propertyName":["EAN"],"value":[{"text":[{"value":["9780231056694"]}]}]},{"propertyName":["Author"],"value":[{"text":[{"value":["Gilles
96
+ Deleuze"]}]}]},{"propertyName":["CP_NAME"],"value":[{"text":[{"value":["Nietzsche
97
+ and Philosophy by Gilles Deleuze (1985, Paperback)"]}]}]},{"propertyName":["Format_Computed"],"value":[{"text":[{"value":["Trade
98
+ Paper"]}]}]}],"productStatus":[{"excludeForeBaySelling":["false"],"excludeForeBayReviews":["false"],"excludeForHalfSelling":["false"]}],"type":["Member"]}]}]}'
99
+ http_version:
100
+ recorded_at: Sun, 11 May 2014 22:04:08 GMT
101
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,96 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://svcs.sandbox.ebay.com/services/marketplacecatalog/ProductMetadataService/v1?GLOBAL-ID=EBAY-US&OPERATION-NAME=getProductSearchDataVersion&categoryId=123
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-EBAY-SOA-SECURITY-APPNAME:
11
+ - APP_ID
12
+ response:
13
+ status:
14
+ code: 200
15
+ message:
16
+ headers:
17
+ Server:
18
+ - Apache-Coyote/1.1
19
+ X-EBAY-SOA-SERVICE-METRICS:
20
+ - '6211150'
21
+ X-EBAY-SOA-REQUEST-ID:
22
+ - 145ed517-6580-a471-d312-7542ffffe3bd!ProductMetadataService!10.71.29.49!v3apifindingsandboxcore[]
23
+ X-EBAY-SOA-SERVICE-VERSION:
24
+ - 1.6.0
25
+ X-EBAY-SOA-LOCALE-LIST:
26
+ - en-US_US
27
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
28
+ - NONE
29
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
30
+ - XML
31
+ X-EBAY-SOA-GLOBAL-ID:
32
+ - EBAY-US
33
+ X-EBAY-SOA-OPERATION-NAME:
34
+ - getProductSearchDataVersion
35
+ X-EBAY-SOA-SERVICE-NAME:
36
+ - "{http://www.ebay.com/marketplace/marketplacecatalog/v1/services}ProductMetadataService"
37
+ Content-Type:
38
+ - text/xml;charset=UTF-8
39
+ Transfer-Encoding:
40
+ - ''
41
+ Date:
42
+ - Sun, 11 May 2014 22:05:10 GMT
43
+ body:
44
+ encoding: UTF-8
45
+ string: <?xml version='1.0' encoding='UTF-8'?><getProductSearchDataVersionResponse
46
+ xmlns="http://www.ebay.com/marketplace/marketplacecatalog/v1/services"><ack>Failure</ack><errorMessage><error><errorId>28</errorId><domain>Marketplace</domain><severity>Error</severity><category>System</category><message>Category
47
+ ID, 123, is invalid.</message><subdomain>MarketplaceCatalog</subdomain><parameter>123</parameter></error></errorMessage><version>1.6.0</version><timestamp>2014-05-11T22:05:10.104Z</timestamp></getProductSearchDataVersionResponse>
48
+ http_version:
49
+ recorded_at: Sun, 11 May 2014 22:05:09 GMT
50
+ - request:
51
+ method: get
52
+ uri: http://svcs.sandbox.ebay.com/services/marketplacecatalog/ProductMetadataService/v1?GLOBAL-ID=EBAY-US&OPERATION-NAME=getProductSearchDataVersion&RESPONSE-DATA-FORMAT=JSON&categoryId=123
53
+ body:
54
+ encoding: US-ASCII
55
+ string: ''
56
+ headers:
57
+ X-EBAY-SOA-SECURITY-APPNAME:
58
+ - APP_ID
59
+ response:
60
+ status:
61
+ code: 200
62
+ message:
63
+ headers:
64
+ Server:
65
+ - Apache-Coyote/1.1
66
+ X-EBAY-SOA-SERVICE-METRICS:
67
+ - '5185806'
68
+ X-EBAY-SOA-REQUEST-ID:
69
+ - 145ed526-7200-a471-d300-04c0ffffe557!ProductMetadataService!10.71.29.48!v3apifindingsandboxcore[]
70
+ X-EBAY-SOA-SERVICE-VERSION:
71
+ - 1.6.0
72
+ X-EBAY-SOA-LOCALE-LIST:
73
+ - en-US_US
74
+ X-EBAY-SOA-MESSAGE-PROTOCOL:
75
+ - NONE
76
+ X-EBAY-SOA-RESPONSE-DATA-FORMAT:
77
+ - JSON
78
+ X-EBAY-SOA-GLOBAL-ID:
79
+ - EBAY-US
80
+ X-EBAY-SOA-OPERATION-NAME:
81
+ - getProductSearchDataVersion
82
+ X-EBAY-SOA-SERVICE-NAME:
83
+ - "{http://www.ebay.com/marketplace/marketplacecatalog/v1/services}ProductMetadataService"
84
+ Content-Type:
85
+ - text/plain;charset=UTF-8
86
+ Transfer-Encoding:
87
+ - ''
88
+ Date:
89
+ - Sun, 11 May 2014 22:06:11 GMT
90
+ body:
91
+ encoding: UTF-8
92
+ string: '{"getProductSearchDataVersionResponse":[{"ack":["Failure"],"errorMessage":[{"error":[{"errorId":["28"],"domain":["Marketplace"],"severity":["Error"],"category":["System"],"message":["Category
93
+ ID, 123, is invalid."],"subdomain":["MarketplaceCatalog"],"parameter":["123"]}]}],"version":["1.6.0"],"timestamp":["2014-05-11T22:06:11.760Z"]}]}'
94
+ http_version:
95
+ recorded_at: Sun, 11 May 2014 22:06:11 GMT
96
+ recorded_with: VCR 2.9.0
@@ -0,0 +1,125 @@
1
+ ---
2
+ http_interactions:
3
+ - request:
4
+ method: get
5
+ uri: http://open.api.sandbox.ebay.com/shopping?CALLNAME=FindHalfProducts&QueryKeywords=ernesto+laclau
6
+ body:
7
+ encoding: US-ASCII
8
+ string: ''
9
+ headers:
10
+ X-EBAY-API-APP-ID:
11
+ - APP_ID
12
+ X-EBAY-API-VERSION:
13
+ - 799
14
+ response:
15
+ status:
16
+ code: 200
17
+ message:
18
+ headers:
19
+ Content-Type:
20
+ - text/xml;charset=utf-8
21
+ Cache-Control:
22
+ - no-cache
23
+ Expires:
24
+ - Sat, 25 Dec 1999 00:00:00 GMT
25
+ Last-Modified:
26
+ - Sun, 11 May 2014 21:37:30 GMT
27
+ Pragma:
28
+ - no-cache
29
+ Server:
30
+ - Apache-Coyote/1.1
31
+ X-EBAY-API-BUILD-TAG:
32
+ - E867_CORE_APILW2_16754878_R1
33
+ X-EBAY-API-POOL-NAME:
34
+ - ___cDRidW9rdDd1Zm1hZGh7Zml1Zg==
35
+ X-EBAY-API-SERVER-NAME:
36
+ - ___dm8ucnA3MyhjM2djMzJlKjc3LTI3KTE8KD41Pz43OzU=
37
+ X-EBAY-ESB-GUID:
38
+ - urn:uuid:F6312D3A17B1431B3A231610888800615421803067607
39
+ Date:
40
+ - Sun, 11 May 2014 21:37:30 GMT
41
+ Transfer-Encoding:
42
+ - ''
43
+ Connection:
44
+ - Keep-Alive
45
+ body:
46
+ encoding: UTF-8
47
+ string: "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n <FindHalfProductsResponse
48
+ xmlns=\"urn:ebay:apis:eBLBaseComponents\">\n <Timestamp>2014-05-11T21:37:30.214Z</Timestamp>\n
49
+ \ <Ack>Success</Ack>\n <Build>E867_CORE_APILW2_16754878_R1</Build>\n <Version>867</Version>\n
50
+ \ <PageNumber>1</PageNumber>\n <ApproximatePages>42</ApproximatePages>\n
51
+ \ <MoreResults>true</MoreResults>\n <TotalProducts>42</TotalProducts>\n
52
+ \ <Products>\n <Product>\n <Title>Hegemony and Socialist Strategy
53
+ : Towards a Radical Democratic Politics by Ernesto Laclau and Chantal Mouffe
54
+ (1985, Paperback)</Title>\n <DetailsURL>http://syicatalogs.sandbox.ebay.com/ws/eBayISAPI.dll?PageSyiProductDetails&amp;IncludeAttributes=1&amp;ShowAttributesTable=1&amp;ProductMementoString=116501:2:1055:1801344777:636461977:f037f5013398147917ef7356f3f28683:1:1:1:411300</DetailsURL>\n
55
+ \ <StockPhotoURL>http://i.ebayimg.com/00/$T2eC16dHJG8E9nyfpmrQBRVzID0nGw~~_6.JPG?set_id=89040003C1</StockPhotoURL>\n
56
+ \ <DisplayStockPhotos>true</DisplayStockPhotos>\n <ItemCount>0</ItemCount>\n
57
+ \ <ProductID type=\"Reference\">308707</ProductID>\n <ProductID type=\"ISBN\">086091769X</ProductID>\n
58
+ \ <ProductID type=\"ISBN\">9780860917694</ProductID>\n <DomainName>Textbooks,
59
+ Education</DomainName>\n <ItemSpecifics>\n <NameValueList>\n <Name>Publisher</Name>\n
60
+ \ <Value>Verso Books</Value>\n </NameValueList>\n <NameValueList>\n
61
+ \ <Name>Author</Name>\n <Value>Chantal Mouffe</Value>\n <Value>Ernesto
62
+ Laclau</Value>\n </NameValueList>\n <NameValueList>\n <Name>Title</Name>\n
63
+ \ <Value>Hegemony and Socialist Strategy : Towards a Radical Democratic
64
+ Politics by Ernesto Laclau and Chantal Mouffe (1985, Paperback)</Value>\n
65
+ \ </NameValueList>\n <NameValueList>\n <Name>Language</Name>\n
66
+ \ <Value>English</Value>\n </NameValueList>\n </ItemSpecifics>\n
67
+ \ <ReviewCount>0</ReviewCount>\n <MinPrice currencyID=\"USD\">5.08</MinPrice>\n
68
+ \ </Product>\n </Products>\n <ProductSearchURL>http://search.half.sandbox.ebay.com/ernesto-laclau</ProductSearchURL>\n
69
+ \ </FindHalfProductsResponse>\n "
70
+ http_version:
71
+ recorded_at: Sun, 11 May 2014 21:37:29 GMT
72
+ - request:
73
+ method: get
74
+ uri: http://open.api.sandbox.ebay.com/shopping?CALLNAME=FindHalfProducts&QueryKeywords=ernesto+laclau&RESPONSEENCODING=JSON
75
+ body:
76
+ encoding: US-ASCII
77
+ string: ''
78
+ headers:
79
+ X-EBAY-API-APP-ID:
80
+ - APP_ID
81
+ X-EBAY-API-VERSION:
82
+ - 799
83
+ response:
84
+ status:
85
+ code: 200
86
+ message:
87
+ headers:
88
+ Content-Type:
89
+ - text/plain;charset=utf-8
90
+ Cache-Control:
91
+ - no-cache
92
+ Expires:
93
+ - Sat, 25 Dec 1999 00:00:00 GMT
94
+ Last-Modified:
95
+ - Sun, 11 May 2014 21:37:30 GMT
96
+ Pragma:
97
+ - no-cache
98
+ Server:
99
+ - Apache-Coyote/1.1
100
+ X-EBAY-API-BUILD-TAG:
101
+ - E867_CORE_APILW2_16754878_R1
102
+ X-EBAY-API-POOL-NAME:
103
+ - ___cDRidW9rdDd1Zm1hZGh7Zml1Zg==
104
+ X-EBAY-API-SERVER-NAME:
105
+ - ___dm8ucnA3MyhnZTE1MTM1Kjc3LTI3KTE8KDIyPz43OzU=
106
+ X-EBAY-ESB-GUID:
107
+ - urn:uuid:3539309CC9B8FD194815692613447223882589539128
108
+ Date:
109
+ - Sun, 11 May 2014 21:37:30 GMT
110
+ Transfer-Encoding:
111
+ - ''
112
+ Connection:
113
+ - Keep-Alive
114
+ body:
115
+ encoding: UTF-8
116
+ string: '{"Timestamp":"2014-05-11T21:37:30.721Z","Ack":"Success","Build":"E867_CORE_APILW2_16754878_R1","Version":"867","PageNumber":1,"ApproximatePages":42,"MoreResults":true,"TotalProducts":42,"Products":{"Product":[{"Title":"Hegemony
117
+ and Socialist Strategy : Towards a Radical Democratic Politics by Ernesto
118
+ Laclau and Chantal Mouffe (1985, Paperback)","DetailsURL":"http://syicatalogs.sandbox.ebay.com/ws/eBayISAPI.dll?PageSyiProductDetails&IncludeAttributes=1&ShowAttributesTable=1&ProductMementoString=116501:2:1055:1801344777:636461977:f037f5013398147917ef7356f3f28683:1:1:1:411300","StockPhotoURL":"http://i.ebayimg.com/00/$T2eC16dHJG8E9nyfpmrQBRVzID0nGw~~_6.JPG?set_id=89040003C1","DisplayStockPhotos":true,"ItemCount":0,"ProductID":[{"Value":"308707","Type":"Reference"},{"Value":"086091769X","Type":"ISBN"},{"Value":"9780860917694","Type":"ISBN"}],"DomainName":"Textbooks,
119
+ Education","ItemSpecifics":{"NameValueList":[{"Name":"Publisher","Value":["Verso
120
+ Books"]},{"Name":"Author","Value":["Chantal Mouffe","Ernesto Laclau"]},{"Name":"Title","Value":["Hegemony
121
+ and Socialist Strategy : Towards a Radical Democratic Politics by Ernesto
122
+ Laclau and Chantal Mouffe (1985, Paperback)"]},{"Name":"Language","Value":["English"]}]},"ReviewCount":0,"MinPrice":{"Value":5.08,"CurrencyID":"USD"}}]},"ProductSearchURL":"http://search.half.sandbox.ebay.com/ernesto-laclau"}'
123
+ http_version:
124
+ recorded_at: Sun, 11 May 2014 21:37:29 GMT
125
+ recorded_with: VCR 2.9.0
data/test/helper.rb ADDED
@@ -0,0 +1,12 @@
1
+ require 'minitest/autorun'
2
+ require 'minitest/emoji'
3
+ require 'pry'
4
+ require 'vcr'
5
+
6
+ VCR.configure do |c|
7
+ c.cassette_library_dir = File.dirname(__FILE__) + '/cassettes'
8
+ c.default_cassette_options = { record: :new_episodes }
9
+ c.hook_into :excon
10
+ c.before_record { |http| http.ignore! if http.response.status.code >= 400 }
11
+ c.filter_sensitive_data('APP_ID') { Ebay::Config.app_id }
12
+ end
@@ -0,0 +1,36 @@
1
+ require 'helper'
2
+ require 'ebay/finding'
3
+
4
+ class TestFinding < Minitest::Test
5
+ def setup
6
+ VCR.insert_cassette('finding')
7
+
8
+ @finding = Ebay::Finding.new
9
+ @finding.sandbox!
10
+ end
11
+
12
+ def teardown
13
+ VCR.eject_cassette
14
+ end
15
+
16
+ def test_finds_items_by_keywords
17
+ params = {
18
+ 'GLOBAL-ID' => 'EBAY-US',
19
+ 'OPERATION-NAME' => 'findItemsByKeywords',
20
+ 'keywords' => 'ernesto laclau'
21
+ }
22
+ parser = @finding.get(query: params, expects: 200)
23
+ assert_kind_of Hash, parser.parse
24
+ end
25
+
26
+ def test_finds_items_by_keywords_with_json
27
+ params = {
28
+ 'RESPONSEENCODING' => 'JSON',
29
+ 'GLOBAL-ID' => 'EBAY-US',
30
+ 'OPERATION-NAME' => 'findItemsByKeywords',
31
+ 'keywords' => 'ernesto laclau'
32
+ }
33
+ parser = @finding.get(query: params, expects: 200)
34
+ assert_kind_of Hash, parser.parse
35
+ end
36
+ end
@@ -0,0 +1,34 @@
1
+ require 'helper'
2
+ require 'ebay/merchandising'
3
+
4
+ class TestMerchandising < Minitest::Test
5
+ def setup
6
+ VCR.insert_cassette('merchandising')
7
+
8
+ @merchandising = Ebay::Merchandising.new
9
+ @merchandising.sandbox!
10
+ end
11
+
12
+ def teardown
13
+ VCR.eject_cassette
14
+ end
15
+
16
+ def test_gets_most_watched_items
17
+ params = {
18
+ 'GLOBAL-ID' => 'EBAY-US',
19
+ 'OPERATION-NAME' => 'getMostWatchedItems'
20
+ }
21
+ parser = @merchandising.get(query: params, expects: 200)
22
+ assert_kind_of Hash, parser.parse
23
+ end
24
+
25
+ def test_gets_most_watched_items_with_json
26
+ params = {
27
+ 'RESPONSE-DATA-FORMAT' => 'JSON',
28
+ 'GLOBAL-ID' => 'EBAY-US',
29
+ 'OPERATION-NAME' => 'getMostWatchedItems'
30
+ }
31
+ parser = @merchandising.get(query: params, expects: 200)
32
+ assert_kind_of Hash, parser.parse
33
+ end
34
+ end
@@ -0,0 +1,25 @@
1
+ require 'helper'
2
+ require 'ebay/parser'
3
+
4
+ class TestEbayParser < Minitest::Test
5
+ def build_response(content_type, body)
6
+ OpenStruct.new(
7
+ headers: { 'Content-Type' => content_type },
8
+ body: body
9
+ )
10
+ end
11
+
12
+ def test_parses_xml
13
+ response = build_response('text/xml', '<foo>bar</foo>')
14
+ parser = Ebay::Parser.new(response)
15
+
16
+ assert_kind_of Hash, parser.parse
17
+ end
18
+
19
+ def test_parses_json
20
+ response = build_response('application/json', '{"foo":"bar"}')
21
+ parser = Ebay::Parser.new(response)
22
+
23
+ assert_kind_of Hash, parser.parse
24
+ end
25
+ end
@@ -0,0 +1,38 @@
1
+ require 'helper'
2
+ require 'ebay/product'
3
+
4
+ class TestProduct < Minitest::Test
5
+ def setup
6
+ VCR.insert_cassette('product')
7
+
8
+ @product = Ebay::Product.new
9
+ @product.sandbox!
10
+ end
11
+
12
+ def teardown
13
+ VCR.eject_cassette
14
+ end
15
+
16
+ def test_gets_product_details
17
+ params = {
18
+ 'GLOBAL-ID' => 'EBAY-US',
19
+ 'OPERATION-NAME' => 'getProductDetails',
20
+ 'productDetailsRequest.dataset' => 'DisplayableSearchResults',
21
+ 'productDetailsRequest.productIdentifier.ePID' => '83414'
22
+ }
23
+ parser = @product.get(query: params, expects: 200)
24
+ assert_kind_of Hash, parser.parse
25
+ end
26
+
27
+ def test_gets_product_details_with_json
28
+ params = {
29
+ 'RESPONSE-DATA-FORMAT' => 'JSON',
30
+ 'GLOBAL-ID' => 'EBAY-US',
31
+ 'OPERATION-NAME' => 'getProductDetails',
32
+ 'productDetailsRequest.dataset' => 'DisplayableSearchResults',
33
+ 'productDetailsRequest.productIdentifier.ePID' => '83414'
34
+ }
35
+ parser = @product.get(query: params, expects: 200)
36
+ assert_kind_of Hash, parser.parse
37
+ end
38
+ end
@@ -0,0 +1,36 @@
1
+ require 'helper'
2
+ require 'ebay/product_metadata'
3
+
4
+ class TestProductMetadata < Minitest::Test
5
+ def setup
6
+ VCR.insert_cassette('product_metadata')
7
+
8
+ @product_metadata = Ebay::ProductMetadata.new
9
+ @product_metadata.sandbox!
10
+ end
11
+
12
+ def teardown
13
+ VCR.eject_cassette
14
+ end
15
+
16
+ def test_gets_product_search_data_version
17
+ params = {
18
+ 'GLOBAL-ID' => 'EBAY-US',
19
+ 'OPERATION-NAME' => 'getProductSearchDataVersion',
20
+ 'categoryId' => '123'
21
+ }
22
+ parser = @product_metadata.get(query: params, expects: 200)
23
+ assert_kind_of Hash, parser.parse
24
+ end
25
+
26
+ def test_gets_product_search_data_version_with_json
27
+ params = {
28
+ 'RESPONSE-DATA-FORMAT' => 'JSON',
29
+ 'GLOBAL-ID' => 'EBAY-US',
30
+ 'OPERATION-NAME' => 'getProductSearchDataVersion',
31
+ 'categoryId' => '123'
32
+ }
33
+ parser = @product_metadata.get(query: params, expects: 200)
34
+ assert_kind_of Hash, parser.parse
35
+ end
36
+ end
@@ -0,0 +1,34 @@
1
+ require 'helper'
2
+ require 'ebay/shopping'
3
+
4
+ class TestShopping < Minitest::Test
5
+ def setup
6
+ VCR.insert_cassette('shopping')
7
+
8
+ @shopping = Ebay::Shopping.new
9
+ @shopping.sandbox!
10
+ end
11
+
12
+ def teardown
13
+ VCR.eject_cassette
14
+ end
15
+
16
+ def test_finds_half_products
17
+ params = {
18
+ 'CALLNAME' => 'FindHalfProducts',
19
+ 'QueryKeywords' => 'ernesto laclau'
20
+ }
21
+ parser = @shopping.get(query: params, expects: 200)
22
+ assert_kind_of Hash, parser.parse
23
+ end
24
+
25
+ def test_finds_half_products_with_json
26
+ params = {
27
+ 'CALLNAME' => 'FindHalfProducts',
28
+ 'RESPONSEENCODING' => 'JSON',
29
+ 'QueryKeywords' => 'ernesto laclau'
30
+ }
31
+ parser = @shopping.get(query: params, expects: 200)
32
+ assert_kind_of Hash, parser.parse
33
+ end
34
+ end
metadata ADDED
@@ -0,0 +1,182 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ebay-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Hakan Ensari
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-05-12 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: multi_xml
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 0.5.5
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 0.5.5
27
+ - !ruby/object:Gem::Dependency
28
+ name: excon
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.33'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.33'
41
+ - !ruby/object:Gem::Dependency
42
+ name: pry
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.9.12
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.9.12
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '10.3'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '10.3'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '5.3'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '5.3'
83
+ - !ruby/object:Gem::Dependency
84
+ name: minitest-emoji
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '2.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '2.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: vcr
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '2.9'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '2.9'
111
+ description:
112
+ email:
113
+ - me@hakanensari.com
114
+ executables: []
115
+ extensions: []
116
+ extra_rdoc_files: []
117
+ files:
118
+ - ".gitignore"
119
+ - ".travis.yml"
120
+ - Gemfile
121
+ - README.md
122
+ - Rakefile
123
+ - ebay-ruby.gemspec
124
+ - lib/ebay-ruby.rb
125
+ - lib/ebay.rb
126
+ - lib/ebay/config.rb
127
+ - lib/ebay/finding.rb
128
+ - lib/ebay/merchandising.rb
129
+ - lib/ebay/parser.rb
130
+ - lib/ebay/product.rb
131
+ - lib/ebay/product_metadata.rb
132
+ - lib/ebay/request.rb
133
+ - lib/ebay/shopping.rb
134
+ - lib/ebay/version.rb
135
+ - test/cassettes/finding.yml
136
+ - test/cassettes/merchandising.yml
137
+ - test/cassettes/product.yml
138
+ - test/cassettes/product_metadata.yml
139
+ - test/cassettes/shopping.yml
140
+ - test/helper.rb
141
+ - test/test_finding.rb
142
+ - test/test_merchandising.rb
143
+ - test/test_parser.rb
144
+ - test/test_product.rb
145
+ - test/test_product_metadata.rb
146
+ - test/test_shopping.rb
147
+ homepage: https://github.com/hakanensari/ebay-ruby
148
+ licenses: []
149
+ metadata: {}
150
+ post_install_message:
151
+ rdoc_options: []
152
+ require_paths:
153
+ - lib
154
+ required_ruby_version: !ruby/object:Gem::Requirement
155
+ requirements:
156
+ - - ">="
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
159
+ required_rubygems_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ requirements: []
165
+ rubyforge_project:
166
+ rubygems_version: 2.2.2
167
+ signing_key:
168
+ specification_version: 4
169
+ summary: A Ruby wrapper to the eBay Web Services API
170
+ test_files:
171
+ - test/cassettes/finding.yml
172
+ - test/cassettes/merchandising.yml
173
+ - test/cassettes/product.yml
174
+ - test/cassettes/product_metadata.yml
175
+ - test/cassettes/shopping.yml
176
+ - test/helper.rb
177
+ - test/test_finding.rb
178
+ - test/test_merchandising.rb
179
+ - test/test_parser.rb
180
+ - test/test_product.rb
181
+ - test/test_product_metadata.rb
182
+ - test/test_shopping.rb