Browse code

Add urlstore call

Jaidyn Levesque authored on 2019-06-19 16:59:06
Showing 2 changed files
... ...
@@ -1120,6 +1120,21 @@
1120 1120
 
1121 1121
 
1122 1122
 
1123
+;; —————————————————————————————————————
1124
+;; URLSTORE CALLS
1125
+
1126
+;; STRING [:BOOLEAN :BOOLEAN] → ALIST || (NIL STRING)
1127
+(defun urlstore-add (url &key (pin 'T) (trickle ""))
1128
+  "Add a URL via urlstore.
1129
+  /ipns/docs.ipfs.io/reference/api/http/#api-v0-urlstore-add"
1130
+  (bind-api-alist
1131
+    (ipfs-call "urlstore/add" `(("arg" ,url)("pin" ,pin)
1132
+				,(when (not (empty-string-p trickle))
1133
+				   `("trickle" ,trickle))))))
1134
+
1135
+
1136
+
1137
+
1123 1138
 ;; —————————————————————————————————————
1124 1139
 ;; VERSION CALLS
1125 1140
 
... ...
@@ -163,6 +163,9 @@
163 163
     :swarm-filters-rm
164 164
     :swarm-peers
165 165
 
166
+    ;; urlstore calls
167
+    :urlstore-add
168
+
166 169
     ;; version calls
167 170
     :version
168 171
     :version-deps))