Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

README.md

clj-fakturoid

A client for Fakturoid API based on clj-http.client.

CircleCI Dependencies Status License

Leiningen/Boot

[clj-fakturoid "0.2.0"]

Documentation

All functions are designed to return errors instead of throwing exceptions (except :pre in a function).

To be able to run examples these lines are needed:

(require '[clj-fakturoid.core :as fakturoid])

(def host "https://app.fakturoid.cz/api/v2")

get-account

Returns an account by a given credentials and slug. Where credentials is a tuple with username and API token.

(:body (fakturoid/get-account host [username token] slug))
{:invoice_language "cz", :phone "", :name "Vaše Jméno",...}

In case of any error while parsing a body, :body attribute is set to nil and the body is associates to :body-unparsed as a string.

(def response (fakturoid/get-account host [username token] slug))

(:body response)
nil

(:body-unparsed response)
"{\"I'm not a JSON\"}"

create-subject

Creates new subject in the addressbook.

(:body (fakturoid/create-subject host [username token] slug {:street "Masarykova 1", :name "foo", ...}))
{:id 1, :street "Masarykova 1", :name "foo",...}

create-invoice

Creates new invoice.

(:body (fakturoid/create-invoice host [username token] slug {:variable_symbol "100012014", ...}))
{:id 1, :variable_symbol "100012014",...}

About

A client for Fakturoid API written in Clojure

Resources

License

Packages

No packages published
You can’t perform that action at this time.