From 470dbd02258367cb6de3eb870a79aae7096f6a50 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Thu, 27 Aug 2020 10:46:58 -0500 Subject: [PATCH] Compat with API change (only POST allowed) --- cl-ipfs-api2.asd | 2 +- main.lisp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cl-ipfs-api2.asd b/cl-ipfs-api2.asd index 02c5554..826a15d 100755 --- a/cl-ipfs-api2.asd +++ b/cl-ipfs-api2.asd @@ -1,5 +1,5 @@ (defsystem "cl-ipfs-api2" - :version "0.5" + :version "0.51" :license "GPLv3" :author "Jaidyn Ann " :description "Bindings for the IPFS HTTP API." diff --git a/main.lisp b/main.lisp index dd07898..4abe9ad 100644 --- a/main.lisp +++ b/main.lisp @@ -21,7 +21,7 @@ ;; STRING LIST [:LIST :BOOLEAN :SYMBOL] → STRING | HASHTABLE | (NIL STRING) (defun ipfs-call (call arguments &key (parameters nil) (want-stream nil) - (method :GET)) + (method :POST)) "Make an IPFS HTTP API call. Quite commonly used. Some calls return strings/raw data, and others return JSON. When strings/arbitrary data are recieved, they're returned verbatim. @@ -99,7 +99,7 @@ /ipns/docs.ipfs.io/reference/api/http/#api-v0-add" (bind-api-result (ipfs-call "add" `(("pin" ,pin) ("only-hash" ,only-hash)) - :method :post :parameters `(("file" . ,pathname))) + :parameters `(("file" . ,pathname))) result)) ;; STRING :NUMBER :NUMBER → STRING || (NIL STRING) @@ -237,7 +237,7 @@ ("mhtype" ,mhtype) ("mhlen" ,mhlen) ("pin" ,pin)) - :method :POST :parameters `(("data" . ,pathname))))) + :parameters `(("data" . ,pathname))))) ;; STRING → NIL (defun block-rm (hash &key (force nil)) @@ -587,7 +587,7 @@ ,(if count (list "count" count)) ,(if cid-version `("cid-version" ,cid-version)) ,(if hash (list "hash" hash))) - :method :post :parameters `(("file" . ,pathname))) + :parameters `(("file" . ,pathname))) result))