Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Common Lisp support for the Etsy API
Common Lisp
branch: master

This branch is 173 commits ahead of bhyde:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
api-class
api-v1
etsy-json
notes
.gitignore
README
TODO
api-mappings.lisp
api-parameter-types.lisp
api-request.lisp
api-response.lisp
authorize.lisp
cl-etsy-elisp-regexps.el
cl-etsy-v1.asd
cl-etsy.asd
environment.lisp
package.lisp
request-timer.lisp
specials.lisp
utils.lisp

README

CL-Etsy was originally authored by Ben Hyde and provided a bridge from Common
Lisp to version 1 of the Etsy.com API[1]. The v1 API was deprecated in November
of 2010 and such that much of the original source is no longer compatible with
the v2 API[1][2][3][4].

After some initial investigation it does not seam reasonable to try make a
wholesale migration of Hyde's existing v1 related source. With the introduction
of the v2 API there has been significant deviation w/r/t REST methods including
non-trivial extensions to the parameters and the "types" of data they accept and
return. Additionally the v2 API allows "associations" via an "includes"
parameter which does not appear to be present at all in the original v1 source.
Some of the original v1 source is available beneath directory cl-etsy/api-v1.

As part of the conversion we've decided to use yason[5] instead of cl-json[6].
Much of the original v1 source rolled out of macrology in the form of
DEF-API-CLASS some of which in turn depended on the output of a hairy function
BUILD-METHODS which snarfed the output of the "getMethodTable" method call from
the Etsy v1 API[7]. It appears that in order for the CL code to interact with
the returned JSON output from v1 API method calls it was neccesary to perform a
not insignificant amount of string to symbol conversion and subesequent
hash-table lookups to maintain sanity w/r/t cl-json's magic symbol interning to
the keyword package - we think yason provides a better, more transparent, and
user-extensible mechanism for achieving similiar results.

It is our intention to reuse salvageable portions of the existing v1
functionality which relies on drakma for RESTfull interaction with the v2 API.

Getting Started:

(pushnew asdf:*central-registry #P"/directory-path/to/cl-etsy/")

(quicklisp:quickload 'cl-etsy)

If file cl-etsy/loadtime-bind.lisp exists it should contain an expression
which sets etsy API and oauth related information for the current user. The
expression should have the following general form:

 (and (setf cl-etsy::*api-key*           "<API-KEY>")
      (setf cl-etsy::*api-shared-secret* "<API-SHARED-SECRET>")
      (set-api-consumer-token)
      (make-api-access-token :consumer *api-consumer-token* :key "<KEY>" :secret "<SECRET>")
      nil)


[1] http://www.etsy.com/developers/documentation
[2] http://www.etsy.com/developers/register
[3] https://www.etsy.com/developers/your-apps
[4] https://groups.google.com/forum/?fromgroups#!forum/etsy-api-v2
[5] http://common-lisp.net/project/yason/
[6] http://common-lisp.net/project/cl-json/
[7] http://www.etsy.com/developers/documentation/reference/apimethod
Something went wrong with that request. Please try again.