Browse code

Updated docs, asdf system, etc.

Jaidyn Levesque authored on 2019-06-19 20:17:52
Showing 3 changed files
... ...
@@ -49,11 +49,26 @@ context. All errors return two values— nil and an error message (string).
49 49
 Make sure to read docstrings for specific information, and keeping the API
50 50
 reference handy is a good idea (/ipns/docs.ipfs.io/reference/api/http/).
51 51
 
52
-
53
-
54
-————————————————————————————————————————
52
+————————————————————
53
+USEFUL VARIABLES
54
+————————————————————
55
+There are three exported variables:
56
+	ipfs:*api-host*    →   "http://127.0.0.1:5001"
57
+	ipfs:*api-root*    →   "/api/v0/"
58
+	ipfs:*ipfs-root*   →   NIL
59
+
60
+*api-host* is the protocol, host, and port of the API server— unless you're
61
+using a custom port or remote server, this probably won't need to change.
62
+*api-root* is the URL root of all API calls on the server— only changes under
63
+very strange circumstances.
64
+*ipfs-root* is the “root” of the local IPFS daemon. This is only used with
65
+the pubsub commands, since they actually invoke the local `ipfs` program.
66
+You only need to change this variable if your $IPFS_PATH is irregular, like
67
+"/var/ipfs/" or something weird like that.
68
+
69
+————————————————————
55 70
 PUBSUB USAGE
56
-————————————————————————————————————————
71
+————————————————————
57 72
 Pubsub usage here is such an abberation that it warrants its own section.
58 73
 Since there isn't a (functional) HTTP API for pubsub yet, we're using the
59 74
 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.
63 78
 If you haven't enabled pubsub (--enable-pubsub-experiment argument to daemon),
64 79
 it won't work.
65 80
 
66
-Well… here we go.
67
-
68 81
 You can sub to a topic with, ofc, #'pubsub-sub, which will return a
69 82
 UIOP-originated process-info stream— while the `ipfs pubsub sub` command runs
70 83
 in the background.
... ...
@@ -1,7 +1,8 @@
1 1
 (defsystem "cl-ipfs-api2"
2
-	   :version "0.1"
2
+	   :version "0.5"
3
+           :license "GPLv3"
3 4
 	   :author "Jaidyn Ann <jadedctrl@teknik.io>"
4
-           :license "AGPLv3"
5
+	   :description "Bindings for the IPFS HTTP API."
5 6
 	   :depends-on (:drakma :yason :arnesi :uiop)
6 7
 	   :components ((:file "package")
7 8
                  	(:file "main")))
... ...
@@ -1,3 +1,12 @@
1
+;; This file is free software: you can redistribute it and/or modify
2
+;; it under the terms of version 3 of the GNU General Public License
3
+;; as published by the Free Software Foundation.
4
+;;
5
+;; This program is distributed in the hope that it will be useful,
6
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
7
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
8
+;; GNU General Public License for more details.
9
+
1 10
 (in-package :cl-ipfs-api2)
2 11
 
3 12
 (defparameter *api-host* "http://127.0.0.1:5001")
... ...
@@ -23,7 +32,7 @@
23 32
 	  (drakma:http-request
24 33
 	    (make-call-url *api-host* *api-root* call arguments)
25 34
 	    :method method
26
-	    :url-encoder #'ipfs:url-encode
35
+	    :url-encoder #'ipfs::url-encode
27 36
 	    :parameters parameters
28 37
 	    :want-stream want-stream)))
29 38