kasz / shopify-clj

Very basic API bindings for Clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

# shopify-clj

Shopify API adapter for Clojure.

## Usage

To generate password from parameters received in URL just pass them as second
parameter (as struct) to generate-password function, along with secret value
as first parameter. To use API method just pass map with parameters to
function like shopify-(verb), where verb can be any of read, create, update
and delete as first parameter and route as "/action" string,
e.g. "/products". Optional third parameter specifies parameter map.

Examples:

Generating password:

user> (generate-password "sharedsecret1234"
			 {"shop" "xxx1234.myshopify.com", "timestamp" "1133831885", 
			 "signature" "ssssssssssssssssssssssssssssssss", "t" "tttttttttttttttttttttttttttttttt"})

"somepassword5678"

Asking for products:

(shopify-read (struct request-credentials "xxx1234.myshopify.com" 
			    "apikey1234" "somepassword5678")
	      "/products")

{"products" ...}

## License

Copyright (C) 2011 FIXME

Distributed under the Eclipse Public License, the same as Clojure.

About

Very basic API bindings for Clojure


Languages

Language:Clojure 100.0%