在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:keorn/clj-ipfs-http-client开源软件地址:https://github.com/keorn/clj-ipfs-http-client开源编程语言:Clojure 100.0%开源软件介绍:IPFS API wrapper in Clojure
Get it[clj-ipfs-api "1.2.3"]
;; In your ns statement:
(ns my.ns
(:require [clj-ipfs-api.core :as ipfs])) UsageLaunch the IPFS Daemon. ;; for default daemon settings use just like cli
;; commands are joined with dashes
(ipfs/swarm-peers)
;; arguments are strings
(ipfs/cat
"QmShWPeTZL5px2YGvgJD99C4SuHEqry1u1RoNu1bAVDkM1"
"QmbRdyLXiFWrKc5hW1NbvpUxF9tLovWCPgiz4BDhjD9k3j")
;; flags go in a map
(ipfs/swarm-peers {:type "indirect"}) Custom API server address has to be set up. (ipfs/set-api-url! "http://127.0.0.1:55555") Everything is decoded from json, except ;; different API server
(ipfs/swarm-peers {:request {:url "http://127.0.0.1:55555"}})
;; for big files use a stream, no json parsing is done in this case
(ipfs/swarm-peers {:request {:as :stream}}) For more options that are taken by the |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论