Add refs calls
This commit is contained in:
parent
1b83ff3ddf
commit
f572f0c0e8
21
main.lisp
21
main.lisp
|
@ -965,6 +965,27 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
;; —————————————————————————————————————
|
||||||
|
;; REFS CALLS
|
||||||
|
|
||||||
|
;; STRING [:BOOLEAN :BOOLEAN :NUMBER] → ALIST || (NIL STRING)
|
||||||
|
(defun refs (path &key (unique "") (recursive "") (max-depth -1))
|
||||||
|
"List links (references) from an object.
|
||||||
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-refs"
|
||||||
|
(bind-api-alist
|
||||||
|
(ipfs-call "refs" `(("arg" ,path)("max-depth" ,max-depth)
|
||||||
|
,(if (not (empty-string-p recursive))
|
||||||
|
`("recursive" ,recursive))))))
|
||||||
|
|
||||||
|
;; NIL → ALIST || (NIL STRING)
|
||||||
|
(defun refs-local ()
|
||||||
|
"List all local references.
|
||||||
|
/ipns/docs.ipfs.io/reference/api/http/#api-v0-refs-local"
|
||||||
|
(bind-api-alist (ipfs-call "refs/local" '())))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;; —————————————————————————————————————
|
;; —————————————————————————————————————
|
||||||
;; VERSION CALLS
|
;; VERSION CALLS
|
||||||
|
|
||||||
|
|
|
@ -136,6 +136,10 @@
|
||||||
:pubsub-ls
|
:pubsub-ls
|
||||||
:pubsub-peers
|
:pubsub-peers
|
||||||
|
|
||||||
|
;; refs calls
|
||||||
|
:refs
|
||||||
|
:refs-local
|
||||||
|
|
||||||
;; version calls
|
;; version calls
|
||||||
:version
|
:version
|
||||||
:version-deps))
|
:version-deps))
|
||||||
|
|
Ŝarĝante…
Reference in New Issue