diff --git a/README.txt b/README.txt index 1739a11..cafbcd8 100644 --- a/README.txt +++ b/README.txt @@ -49,11 +49,26 @@ context. All errors return two values— nil and an error message (string). Make sure to read docstrings for specific information, and keeping the API reference handy is a good idea (/ipns/docs.ipfs.io/reference/api/http/). +———————————————————— +USEFUL VARIABLES +———————————————————— +There are three exported variables: + ipfs:*api-host* → "http://127.0.0.1:5001" + ipfs:*api-root* → "/api/v0/" + ipfs:*ipfs-root* → NIL +*api-host* is the protocol, host, and port of the API server— unless you're +using a custom port or remote server, this probably won't need to change. +*api-root* is the URL root of all API calls on the server— only changes under +very strange circumstances. +*ipfs-root* is the “root” of the local IPFS daemon. This is only used with +the pubsub commands, since they actually invoke the local `ipfs` program. +You only need to change this variable if your $IPFS_PATH is irregular, like +"/var/ipfs/" or something weird like that. -———————————————————————————————————————— +———————————————————— PUBSUB USAGE -———————————————————————————————————————— +———————————————————— Pubsub usage here is such an abberation that it warrants its own section. Since there isn't a (functional) HTTP API for pubsub yet, we're using the actual go-ipfs program from your computer. @@ -63,8 +78,6 @@ If you are using Windows, or anything but *nix, it probably won't work. If you haven't enabled pubsub (--enable-pubsub-experiment argument to daemon), it won't work. -Well… here we go. - You can sub to a topic with, ofc, #'pubsub-sub, which will return a UIOP-originated process-info stream— while the `ipfs pubsub sub` command runs in the background. diff --git a/cl-ipfs-api2.asd b/cl-ipfs-api2.asd index ce4433b..02c5554 100755 --- a/cl-ipfs-api2.asd +++ b/cl-ipfs-api2.asd @@ -1,7 +1,8 @@ (defsystem "cl-ipfs-api2" - :version "0.1" + :version "0.5" + :license "GPLv3" :author "Jaidyn Ann " - :license "AGPLv3" + :description "Bindings for the IPFS HTTP API." :depends-on (:drakma :yason :arnesi :uiop) :components ((:file "package") (:file "main"))) diff --git a/main.lisp b/main.lisp index 3c380f5..0d45a7a 100644 --- a/main.lisp +++ b/main.lisp @@ -1,3 +1,12 @@ +;; This file is free software: you can redistribute it and/or modify +;; it under the terms of version 3 of the GNU General Public License +;; as published by the Free Software Foundation. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + (in-package :cl-ipfs-api2) (defparameter *api-host* "http://127.0.0.1:5001") @@ -23,7 +32,7 @@ (drakma:http-request (make-call-url *api-host* *api-root* call arguments) :method method - :url-encoder #'ipfs:url-encode + :url-encoder #'ipfs::url-encode :parameters parameters :want-stream want-stream)))