This chapter focuses on one particular variant: the
REST API.
111
C H A P T E R 6
The REST API is accessed using simple HTTP GET and POST requests, which return
XML responses. As you??™ll learn in this chapter, both the request and response phases are
easily handled by Ruby. The eBay REST API, although considerably easier to use than the
full eBay API, is limited to retrieving information. You cannot post new items for sale
using that API. Fortunately, read-only access is fine for reporting purposes. You can find
out the full documentation for eBay??™s REST API at http://developer.ebay.com/
developercenter/rest/eBayRESTAPIGuide.pdf.
Before you can do anything with the eBay API, you need to sign up and retrieve an
authorization token. Visit http://developer.ebay.com/ to create an eBay developer
account.
After you??™ve created an account, you need to generate a set of authorization keys,
which is fairly straightforward. As shown in Figure 6-1, you can create keys for either
eBay??™s main site, called production, or for its test site, called sandbox.
Pages:
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170