fredrick / dwolla-clojure

Official Clojure Wrapper for Dwolla's API

Home Page:https://developers.dwolla.com/dev/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dwolla-sdk-clojure

Build Status

A simple Clojure library that wraps the Dwolla API.

Installation

dwolla-sdk-clojure is available as a Maven artifact from Clojars:

[dwolla-sdk-clojure "0.1.1"]

Usage

The main api functionality is provided by the dwolla-sdk-clojure.core namespace.

Require it in the REPL:

(require '[dwolla-sdk-clojure.core :as dwolla])

Require it in your application:

(ns my-app.core
  (:require [dwolla-sdk-clojure.core :as dwolla]))

The client is a thin interface that requires only an endpoint and message

;An example send POST request:
(dwolla/api :send {:oauth_token "" :pin "" :destinationId "" :amount ""})

;An account info GET request:
(dwolla/api :account_info {:oauth_token ""})

;A nearby GET request:
(dwolla/api :nearby {:client_id "" :client_secret "" :lat "" :long ""})

All results are returned as a map:

{:Response nil, :Message "Invalid access token.", :Success false, :Request-time 321 :Status 200}

;If the endpoint does not exist a generic error message is returned
{:Response nil, :Message "Invalid endpoint." :Success false :Request-time 0 :Status nil}

Support

License

Copyright © 2013 Dwolla

Released under the MIT License: http://www.opensource.org/licenses/mit-license.php

About

Official Clojure Wrapper for Dwolla's API

https://developers.dwolla.com/dev/


Languages

Language:Clojure 100.0%