Live data from Hacker News

An API is only as good as its documentation

rocketeer.be

51–59 of 59 posts

Re: An API is only as good as its documentation

#51

Any recommendations on good doc frameworks/products? We're about to begin redoing our documentation at print.io. Currently we're using swagger ( https://api.print.io/docs/ ) and "self-documentation" ( http://print.io/api ) but i still find that we have a lot of questions.

More of a product, but codecademy (http://www.codecademy.com/learn) has a number of APIs it covers how to use.

Re: An API is only as good as its documentation

#53

It all depends on what kind of API you're building. If you're implementing a RESTful API, no documentation is needed, as it is "surfable" due to the use of hyperlinks. If you're implemeting an RPC API (which is what most of us are doing), good and up-to-date documentation is key, as we need to document each and every meaningful end-point.

Such a RESTful API will be much more difficult to develop than an RPC API + up-to-date documentation.

Re: An API is only as good as its documentation

#54
post #9

I'm working on integrating Braintree payments into a client of mine. Braintree is a perfect example of this and is a wolf in sheep's clothing, meaning, their docs look great at first glance until you need to get all the way through them. For example, you start reading about how to do A. Half way through, you find out you need to do B. So you look at the link to B which then refers to C but C is A and you realize you'…

Hi, I'm one of the devs working on the Braintree docs. You're absolutely right, the information flow in our docs isn't in a great state right now.

We're actively trying to fix the flow issues by consolidating information so you don't have to go tab-hopping to find what you need. If all goes well, hopefully you'll see some improvements showing up very soon™.

If there's a specific problem you'd like to share, I'd welcome the feedback. Either way, we'll keep forging ahead on another rev that's a little easier to follow.

Re: An API is only as good as its documentation

#55

Any recommendations on good doc frameworks/products? We're about to begin redoing our documentation at print.io. Currently we're using swagger ( https://api.print.io/docs/ ) and "self-documentation" ( http://print.io/api ) but i still find that we have a lot of questions.

Definitely check out http://readme.io . Their docs look beautiful and set-up is a breeze.

Thanks for the tip, Tim! Happy to answer any questions folks have about my product.

Also, plugging: Swagger support in just a few weeks. And we can currently auto generate endpoint reference docs from your source code using a commenting standard similar to javadoc.

We get all sorts of excited by good API documentation. Weird, right? Apparently not, based on this thread. :D

Re: An API is only as good as its documentation

#56
post #29

Earlier quoted context omitted.

Had to do a little searching, but here it is: https://app.ticketmatic.com/api/doc

(Author here) Nope, that's the old one for V2 (which isn't very good). We're currently releasing the third generation of the Ticketmatic platform, where one of the big efforts is in improving the developer story. That's not public yet, for which I apologise. There will be a beautiful developer program soon. I didn't think that the article should wait on that. It's the idea that matters and didn't want any discussion…

I think that your redevelopment of API documentation would be an interesting series of blog articles in and of themselves. Giving examples of bad documentation decisions, giving examples of how they were corrected in the new documentation, etc. There are lots of examples of refactoring code, but entirely too few that deal with refactoring the manual.

Re: An API is only as good as its documentation

#57
post #35

Earlier quoted context omitted.

I know what REST is. Congratulations, I now have a URL and a JSON file the URL spits out. I still have no idea what the significance of all the values are. I have no idea what their possible ranges are. I don't know how everything works together. Edit: Also, that's just GET. If you expect me to poke around with POST to learn how your API works, I will run far, far away.

So you don't know what REST is (and didn't read the link I posted earlier).

REST as defined in the original papers, REST as defined by your link, and REST as actually used in practice are all somewhat different.

Even in your link it is plainly obvious that there is no provision for documenting what an endpoint does, or how to find what endpoint maps to something, or even how to query this magical introspective API to figure out what further requests you need to make.

Re: An API is only as good as its documentation

#59
post #9

I'm working on integrating Braintree payments into a client of mine. Braintree is a perfect example of this and is a wolf in sheep's clothing, meaning, their docs look great at first glance until you need to get all the way through them. For example, you start reading about how to do A. Half way through, you find out you need to do B. So you look at the link to B which then refers to C but C is A and you realize you'…

I had a similar experience with the Eventbrite API. The docs looked well-written, and early usage was promising, but then you have to get almost to the end of your implementation before realizing the missing components. In my case, EB allows what's called a "repeating event", or an event that occurs on multiple dates. However, their response JSON doesn't have anything like `{times: []}`, rather it's just `{start: {}, end: {}}`, so you never have a set of the dates. There _is_ a 'repeats: ' property in the response, but that is permanently set to false, and if you have a repeating date it appears as a single-date event where the start and end times are for the next upcoming date.

I would have been better off if they didn't supply that doc at all. If I just fumbled my way through an undocumented pile of service endpoints, I'd have realized its limits much sooner. The doc gave me the false-confidence to build my application based on behaviours in their API which aren't actually implemented.

Post reply on HN