@cryptotaxi247 / kubo / commits / a32128d1d

docs: ipfs-http-client -> kubo-rpc-client (#9331)

Fixes https://github.com/ipfs/js-kubo-rpc-client/issues/35 Co-authored-by: Steve Loeppky <stvn@loeppky.com> Co-authored-by: Marcin Rataj <lidel@lidel.org>

Russell Dempsey committed Nov 22, 2022 at 14:19 UTC a32128d1d30467644ea429ccaf9b7de92083c48a
3 files changed +19 -17
README.md
+4
@@ -378,6 +378,10 @@ Basic proof of 'ipfs working' locally:
378 # QmT78zSuBmuS4z925WZfrqQ1qHaJ56DQaTfyMUF7F8ff5o
379 ipfs cat <that hash>
380
381 +### HTTP/RPC clients
382 +
383 +For programmatic interaction with Kubo, see our [list of HTTP/RPC clients](docs/http-rpc-clients.md).
384 +
385 ### Troubleshooting
386
387 If you have previously installed IPFS before and you are running into problems getting a newer version to work, try deleting (or backing up somewhere else) your IPFS config directory (~/.ipfs by default) and rerunning `ipfs init`. This will reinitialize the config file to its defaults and clear out the local datastore of any bad entries.
docs/http-rpc-clients.md new
+14
@@ -0,0 +1,14 @@
1 +# HTTP/RPC Clients
2 +
3 +Kubo provides official HTTP RPC (`/api/v0`) clients for selected lanaguages:
4 +
5 +- [js-kubo-rpc-client](https://github.com/ipfs/js-kubo-rpc-client) - Official JS client for talking to Kubo RPC over HTTP
6 +- [go-ipfs-api](https://github.com/ipfs/go-ipfs-api) - The go interface to ipfs's HTTP RPC - Follow https://github.com/ipfs/kubo/issues/9124 for coming changes.
7 +- [go-ipfs-http-client](https://github.com/ipfs/go-ipfs-http-client) - IPFS CoreAPI implementation using HTTP RPC - Follow https://github.com/ipfs/kubo/issues/9124 for coming changes.
8 +
9 +## Recommended clients
10 +
11 +| Language | Package Name | Github Repository |
12 +|:--------:|:-------------------:|---------------------------------------------|
13 +| JS | kubo-rpc-client | https://github.com/ipfs/js-kubo-rpc-client |
14 +| Go | go-ipfs-http-client | https://github.com/ipfs/go-ipfs-http-client |
docs/implement-api-bindings.md
+1 -17
@@ -76,28 +76,12 @@ As mentioned above, the API commands map to HTTP with:
76 - the request body streams file data - reads files or stdin
77 - multiple streams are muxed with multipart (todo: add tar stream support)
78
79 -To date, we have two different HTTP API clients:
80 -
81 -- [js-ipfs-api](https://github.com/ipfs/js-ipfs-api) - simple javascript
82 - wrapper -- best to look at
83 -- [kubo/commands/http](https://github.com/ipfs/kubo/tree/916f987de2c35db71815b54bbb9a0a71df829838/commands/http) -
84 - generalized transport based on the [command definitions](https://github.com/ipfs/kubo/tree/916f987de2c35db71815b54bbb9a0a71df829838/core/commands)
79 +You can see the latest [list of our HTTP RPC clients here](http-rpc-clients.md)
80
81 The Go implementation is good to answer harder questions, like how is multipart
82 handled, or what headers should be set in edge conditions. But the javascript
83 implementation is very concise, and easy to follow.
84
90 -#### Anatomy of node-ipfs-api
91 -
92 -Currently, node-ipfs-api has three main files
93 -- [src/index.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/index.js) defines the functions clients of the API
94 - module will use. uses `RequestAPI`, and translates function call parameters to
95 - the API almost directly.
96 -- [src/get-files-stream.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/get-files-stream.js) implements the hardest part:
97 - file streaming. This one uses multipart.
98 -- [src/request-api.js](https://github.com/ipfs-inactive/js-ipfs-http-client/blob/66d1462bd02181d46e8baf4cd9d476b213426ad8/src/request-api.js) generic function call to perform
99 - the actual HTTP requests
100 -
85 ## Note on multipart + inspecting requests
86
87 Despite all the generalization spoken about above, the IPFS API is actually very