Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPFS CLI API Docs #785

Closed
jbenet opened this issue Feb 16, 2015 · 16 comments
Closed

IPFS CLI API Docs #785

jbenet opened this issue Feb 16, 2015 · 16 comments
Labels
topic/commands Topic commands topic/docs-ipfs Topic docs-ipfs

Comments

@jbenet
Copy link
Member

jbenet commented Feb 16, 2015

We should have a way to generate commands + api reference markdown, so we can add it to the website easily.

@jbenet
Copy link
Member Author

jbenet commented Feb 16, 2015

cc @mappum

@dborzov
Copy link
Contributor

dborzov commented Feb 20, 2015

I sketched a tool for that, check it out: https://github.com/dborzov/ipfs-commands/

Here is an example of the source template file it takes. It uses go's template library markup language and just imports the command objects from github.com/core/commands.

Let me know if that could work and I will add command sorting, and subcommand traversing.

@jbenet, @mappum

@llSourcell
Copy link
Contributor

really looking forward to seeing the api reference as i want to build an open source ipfs based twitter clone

@jbenet
Copy link
Member Author

jbenet commented Feb 21, 2015

@dborzov very nice stuff! i'm still handling a lot of alpha stuff --will try to look at this before tue/wed.

@jbenet jbenet added topic/commands Topic commands topic/docs-ipfs Topic docs-ipfs labels Mar 28, 2015
@NodeGuy
Copy link

NodeGuy commented Apr 8, 2015

I want API documentation sooner. I'm currently looking at adding support for DHT commands to the Javascript library.

@jbenet
Copy link
Member Author

jbenet commented Apr 9, 2015

@NodeGuy thanks for bumping. btw, the api follows the cli commands exactly, so at worst case you are free to poke at it now.

More generally, what do people think is a good http api reference format? I like the Stripe and github styles. there's http://apidocjs.com and similar services, and the more recent https://readme.io/ (check out those examples! so pretty.)

@wking
Copy link
Contributor

wking commented Apr 16, 2015

On Wed, Apr 08, 2015 at 08:38:07PM -0700, Juan Batiz-Benet wrote:

More generally, what do people think is a good http api reference
format?

I'd outsource the human-oriented formatting and go to a
machine-parsable format like Swagger 1. There are still a few rough
edges in both the Swagger spec 2 and the default renderer [3,4], but
you can express many common scenarios with clear, concise JSON and get
a pretty UI for free :).

@jbenet
Copy link
Member Author

jbenet commented Apr 17, 2015

@wking swagger looks really good.

I really like the UX of stripe's api docs -- which readme.io is modelled after. i dont know what formats they use yet, and +1 on using machine-readable formats like swagger (layer of indirection+automation \o/ ). Wonder if swagger format + stripe-like frontend would be possible? Or maybe readme.io has an open-source, machine-readable (non-lock-in) format they use?

Hey @gkoberger -- care to comment? We are an open source project and could help spread the use of readme.io. We're also very happy paying for your service (it looks great!) if it delivers value for us-- we just care that it is open (open formats, not locked in, hackable, etc).

@jbenet
Copy link
Member Author

jbenet commented Apr 17, 2015

https://github.com/swagger-api/swagger-spec looks really great

@wking
Copy link
Contributor

wking commented Apr 17, 2015

On Thu, Apr 16, 2015 at 06:27:56PM -0700, Juan Batiz-Benet wrote:

https://github.com/swagger-api/swagger-spec looks really great

Before we go down this road, I should probably list the main caveats
as I see them.

My main issue with the current spec is outlined here [1](basically
it's hard to share model-subsets between models). But we can work
around that with a bit of duplication, which is annoying but will get
us through until the JSON Schema and Swagger folks have a better
alternative.

I'm less sure about the web UI, since I find it easier to just read
the JSON ;). You can put a lot of information in your JSON spec, and
I imagine it's difficult to expose all of that in an intuitive UI.
But I haven't looked into that sort of thing, because I use Swagger so
I can avoid working with that level of UI detail ;).

So for me, these are minor issues and Swagger works great. But if you
require a completely DRY, static schema or a highly polished UI, maybe
Swagger is not quite there yet.

wking referenced this issue in distribution/distribution Jun 22, 2015
For the config settings, I prefer unabbreviated names like 'address',
but I've gone with 'addr' to maintain consistency with the existing
'addr' configuration settings listed in docs/configuration.md.
@RichardLitt
Copy link
Member

Hey @gdillon, saw your post here - I've been looking over the Readme.io documentation, and all I can see as an option for importing GitHub code is a one-off gist importer. Are there any automatic tools available to integrate directly with our GitHub code, and any API doc specs we may have within it (such as Swagger, see above), and to import that directly into Readme.io? Otherwise, it looks like an entirely manual process, which is sub optimal for our code base at the moment.

@gdillon
Copy link

gdillon commented Oct 13, 2015

Hey @RichardLitt, glad to have you looking at ReadMe. I've stepped away from the company, but know there are lots of plans to support that kind of functionality. @gkoberger would be the best person for your questions, or the support@readme.io address. Best!

@gkoberger
Copy link

@RichardLitt You can use Swagger in ReadMe! Email us at support@readme.io and we'll get you hooked up with the beta.

@jbenet
Copy link
Member Author

jbenet commented Oct 14, 2015

👍 for readme.io

@RichardLitt
Copy link
Member

Thanks @gkoberger! We emailed you. I've set up a trial at https://dash.readme.io/project/ipfs-node-api, but wasn't sure how to import things directly. Would love to work with you on this.

@jbenet
Copy link
Member Author

jbenet commented Nov 23, 2015

API Reference discussion moved here: ipfs-inactive/http-api-spec#1

@daviddias daviddias changed the title Commands + API Reference IPFS CLI API Docs Jan 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/commands Topic commands topic/docs-ipfs Topic docs-ipfs
Projects
None yet
Development

No branches or pull requests

8 participants