Updated docs, asdf system, etc.

This commit is contained in:
Jaidyn Levesque 2019-06-19 15:17:52 -05:00
parent bc9de0aae9
commit b7e9eb6b19
3 changed files with 30 additions and 7 deletions

View File

@ -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.

View File

@ -1,7 +1,8 @@
(defsystem "cl-ipfs-api2"
:version "0.1"
:version "0.5"
:license "GPLv3"
:author "Jaidyn Ann <jadedctrl@teknik.io>"
:license "AGPLv3"
:description "Bindings for the IPFS HTTP API."
:depends-on (:drakma :yason :arnesi :uiop)
:components ((:file "package")
(:file "main")))

View File

@ -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)))