summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaidyn Levesque <jadedctrl@teknik.io>2019-06-19 16:59:06 +0000
committerJaidyn Levesque <jadedctrl@teknik.io>2019-06-19 16:59:06 +0000
commited3afe6cd0ac734a0688917267db67ee8ce7a0b9 (patch)
treeb88b5ddbcd6b57e904d85005637b266390a4026b
parentb379b3ef4a7ea45db8cb2b8ce1b1d4a049316e80 (diff)
downloadcl-ipfs-api2-ed3afe6cd0ac734a0688917267db67ee8ce7a0b9.tar.bz2
cl-ipfs-api2-ed3afe6cd0ac734a0688917267db67ee8ce7a0b9.zip
Add urlstore call
-rw-r--r--main.lisp15
-rw-r--r--package.lisp3
2 files changed, 18 insertions, 0 deletions
diff --git a/main.lisp b/main.lisp
index ccec4a2..3c380f5 100644
--- a/main.lisp
+++ b/main.lisp
@@ -1121,6 +1121,21 @@
;; —————————————————————————————————————
+;; URLSTORE CALLS
+
+;; STRING [:BOOLEAN :BOOLEAN] → ALIST || (NIL STRING)
+(defun urlstore-add (url &key (pin 'T) (trickle ""))
+ "Add a URL via urlstore.
+ /ipns/docs.ipfs.io/reference/api/http/#api-v0-urlstore-add"
+ (bind-api-alist
+ (ipfs-call "urlstore/add" `(("arg" ,url)("pin" ,pin)
+ ,(when (not (empty-string-p trickle))
+ `("trickle" ,trickle))))))
+
+
+
+
+;; —————————————————————————————————————
;; VERSION CALLS
;; NIL → STRING
diff --git a/package.lisp b/package.lisp
index 8f3f183..6a2cf63 100644
--- a/package.lisp
+++ b/package.lisp
@@ -163,6 +163,9 @@
:swarm-filters-rm
:swarm-peers
+ ;; urlstore calls
+ :urlstore-add
+
;; version calls
:version
:version-deps))