Skip to content
This repository was archived by the owner on Sep 22, 2021. It is now read-only.

Commit caa6252

Browse files
committed
Fix for latest go-ipfs
License: MIT Signed-off-by: Hector Sanjuan <[email protected]>
1 parent 1a77c39 commit caa6252

File tree

4 files changed

+26
-29
lines changed

4 files changed

+26
-29
lines changed

endpoints.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ import (
1010
"sort"
1111
"strings"
1212

13-
cmds "gx/ipfs/QmTjNRVt2fvaRFu93keEC7z5M1GS1iH6qZ9227htQioTUY/go-ipfs-cmds"
14-
corecmds "gx/ipfs/QmcKwjeebv5SX3VFUGDFa4BNMYhy14RRaCzQP7JN3UQDpB/go-ipfs/core/commands"
15-
config "gx/ipfs/QmcKwjeebv5SX3VFUGDFa4BNMYhy14RRaCzQP7JN3UQDpB/go-ipfs/repo/config"
16-
cmdkit "gx/ipfs/QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM/go-ipfs-cmdkit"
13+
config "github.com/ipfs/go-ipfs"
14+
cmdkit "github.com/ipfs/go-ipfs-cmdkit"
15+
cmds "github.com/ipfs/go-ipfs-cmds"
16+
corecmds "github.com/ipfs/go-ipfs/core/commands"
1717
)
1818

1919
// A map of single endpoints to be skipped (subcommands are processed though).

formatter.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@ type Formatter interface {
1717
func GenerateDocs(api []*Endpoint, formatter Formatter) string {
1818
buf := new(bytes.Buffer)
1919
buf.WriteString(formatter.GenerateIntro())
20-
buf.WriteString(formatter.GenerateIndex(api))
20+
// In docs.ipfs.io this is handled by the TOC.
21+
// buf.WriteString(formatter.GenerateIndex(api))
2122
for _, endp := range api {
2223
buf.WriteString(formatter.GenerateEndpointBlock(endp))
2324
buf.WriteString(formatter.GenerateArgumentsBlock(endp.Arguments, endp.Options))

markdown.go

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -15,23 +15,29 @@ type MarkdownFormatter struct{}
1515

1616
func (md *MarkdownFormatter) GenerateIntro() string {
1717
buf := new(bytes.Buffer)
18-
fmt.Fprintf(buf, `section: Docs
19-
title: API | IPFS Docs
20-
pagetype: subdoc
21-
url: docs/api
22-
save_as: docs/api/index.html
18+
fmt.Fprintf(buf, `----
19+
title: "HTTP API"
20+
weight: 20
21+
menu:
22+
reference:
23+
parent: api
24+
----
2325
24-
25-
# API Reference
26+
<!-- TODO: Describe how to change ports and configure the API server -->
27+
<!-- TODO: Structure this around command groups (dag, object, files, etc.) -->
2628
2729
<sup>Generated on %s, from go-ipfs v%s.</sup>
2830
29-
This is the HTTP API specification for IPFS.
31+
When an IPFS node is running as a daemon, it exposes an HTTP API that allows
32+
you to control the node and run the same commands you can from the command
33+
line.
3034
31-
IPFS HTTP API is an RPC API which should work across different
32-
IPFS implementations. The most feature-complete of those implementations,
33-
and current reference for this specification is
34-
[go-ipfs](https://github.com/ipfs/go-ipfs).
35+
In many cases, using this API this is preferable to embedding IPFS directly in
36+
your program — it allows you to maintain peer connections that are longer
37+
lived than your app and you can keep a single IPFS node running instead of
38+
several if your app can be launched multiple times. In fact, the `+"`ipfs`"+`
39+
CLI commands use this API when operating in [online mode]({{< relref
40+
"usage.md#going-online" >}}).
3541
3642
This document is autogenerated from go-ipfs. For issues and support, check out
3743
the [ipfs-http-api-docs](https://github.com/ipfs/ipfs-http-api-docs)

package.json

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,19 +8,9 @@
88
},
99
"gxDependencies": [
1010
{
11-
"hash": "QmceUdzxkimdYsgtX733uNgzf1DLHyBKN6ehGSp85ayppM",
12-
"name": "go-ipfs-cmdkit",
13-
"version": "1.0.0"
14-
},
15-
{
16-
"hash": "QmTjNRVt2fvaRFu93keEC7z5M1GS1iH6qZ9227htQioTUY",
17-
"name": "go-ipfs-cmds",
18-
"version": "1.0.13"
19-
},
20-
{
21-
"hash": "QmcKwjeebv5SX3VFUGDFa4BNMYhy14RRaCzQP7JN3UQDpB",
11+
"hash": "QmUJYo4etAQqFfSS2rarFAE97eNGB8ej64YkRT2SmsYD4r",
2212
"name": "go-ipfs",
23-
"version": "0.4.15"
13+
"version": "0.4.18"
2414
}
2515
],
2616
"gxVersion": "0.10.0",

0 commit comments

Comments
 (0)