diff --git a/main.lisp b/main.lisp index dcca1cd..9e67657 100644 --- a/main.lisp +++ b/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 diff --git a/package.lisp b/package.lisp index 97f1545..e305d87 100644 --- a/package.lisp +++ b/package.lisp @@ -136,6 +136,10 @@ :pubsub-ls :pubsub-peers + ;; refs calls + :refs + :refs-local + ;; version calls :version :version-deps))