ClojureScript wrapper for JavaScript HTTPL client library
;; Add to dependencies
[cljs-ipfs-api "0.0.12-SNAPSHOT"]
(ns my.app
(:require
[cljs-ipfs-api.core :as icore :refer [init-ipfs-node]] ;;Or init-ipfs-web for web
[cljs-ipfs-api.files :as ifiles]))
So basically, stick with the js-ipfs-api docs, all methods there have their kebab-cased version in this library. Also, return values and responses in callbacks are automatically kebab-cased and keywordized. You can provide IPFS instance as an additional first argument to each function, in case you'd need more than one connection:
(init-ipfs-node "/ip4/127.0.0.1/tcp/5001")
(ifiles/fls "/ipfs/QmYwAPJzv5CZsnA625s3Xf2nemtYgPpHdWEz79ojWnPbdG/" (fn [err files]
(info [err "ERROR"])
(info [files "FILES"])))
You can also provide an async channel instead of the callback function