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

DevDocs format for integration into IDE (API) #133

Closed
edno opened this issue Nov 8, 2014 · 21 comments
Closed

DevDocs format for integration into IDE (API) #133

edno opened this issue Nov 8, 2014 · 21 comments
Labels

Comments

@edno
Copy link

edno commented Nov 8, 2014

For now, it's not possible to query with CURL-like libs using the OpenSearch URL as JavaScript is not supported.
It should be good to have an output raw format like pure HTML, XML or JSON. This might be implemented thru a JSON API

@Thibaut
Copy link
Member

Thibaut commented Nov 16, 2014

I agree this would be great but it'd require a search back-end (right now it's all done in the browser). Short-term this isn't one of my priorities.

@jbrooksuk
Copy link

Is there any such API for DevDocs?

@Thibaut
Copy link
Member

Thibaut commented Feb 18, 2015

@jbrooksuk No. This is a major undertaking which most DevDocs users probably don't need, so I'd rather focus on other things for now. However, if a software / IDE vendor is interested in integrating with DevDocs and needs this, I'm happy to chat about it.

@jbrooksuk
Copy link

Thanks for your reply @Thibaut - do you know of any service which does provide an API?

@Thibaut
Copy link
Member

Thibaut commented Feb 18, 2015

@jbrooksuk I don't, sorry. But it shouldn't be too hard to implement this on top of DevDocs's metadata and generated files:
http://maxcdn-docs.devdocs.io/html/index.json
http://maxcdn-docs.devdocs.io/html/db.json
The problem for me is more about maintaining a search API (more servers, support, maintenance, etc.) than implementing it (which is pretty straightforward).

@trollixx
Copy link

Hi. I am a developer of Zeal offline documentation browser. I would like to add support for DevDocs.io as another source of documentation in addition to Dash docsets. Zeal has it's own search capabilities, so it wouldn't require any API support.

My questions are:

  1. Is it fine to download index.json and db.json from maxcdn-docs.devdocs.io in Zeal?
  2. Where is the proper place to obtain a list of all DevDocs documentation? I've seen that file, but I cannot find docs.json file, which is referenced in some places.

@Thibaut
Copy link
Member

Thibaut commented Feb 24, 2015

Hi @trollixx

Glad to hear you're looking to make DevDocs's documentation available in Zeal.

Is it fine to download index.json and db.json from maxcdn-docs.devdocs.io in Zeal?

Yes, but:

  • I never purge the cache on that CDN, so something like maxcdn-docs.devdocs.io/css/index.json is not guaranteed to be up-to-date. To get the correct version you need to append the mtime of that particular doc (defined in docs.json) as a query param (e.g. maxcdn-docs.devdocs.io/css/index.json?1420139789).
  • I can't guarantee that I won't make breaking changes to the data format of the these files, or their location. When I do, I'll try to remember to let you know about it.
  • Please attribute each document to devdocs.io in a way that your users will notice. It takes a lot of work to maintain these docs / metadata.

Where is the proper place to obtain a list of all DevDocs documentation?

Currently the docs.json file doesn't have a unique URL (it gets deployed with a different filename every time it changes, like the other assets). I'll make devdocs.io/docs.json redirect to the most recent version for you this week-end. However, please make sure Zeal doesn't request that file too often (on boot is ok), since it goes through my server — not the CDN.

@trollixx
Copy link

@Thibaut, thanks for the answer.

No any hurry at this point, such change would not happen quickly. I just wanted to confirm your acceptance of a third-party app providing access to DevDocs documentation. I still need to do a lot work to make Zeal more friendly to different formats and documentation sources.

I'll let you know, when I start working on such feature.

@Thibaut
Copy link
Member

Thibaut commented Feb 24, 2015

I'll let you know, when I start working on such feature.

Cool 👍

@Thibaut Thibaut changed the title DevDocs format for integration into IDE DevDocs format for integration into IDE (API) Mar 29, 2015
@gregberger
Copy link

I'd be interested too to have access to such a thing as devdocs.io/docs.json as i'm using an Alfred workflow with Devdocs integration (https://github.com/yannickglt/alfred-devdocs) that has an hardcoded list of docs in it... would be great to have the ability to fetch the list dynamically.

@Thibaut
Copy link
Member

Thibaut commented May 20, 2015

@naabys Oops, I broke devdocs.io/docs.json when I made the CDN urls protocol-relative. It's fixed now.

@gregberger
Copy link

@Thibaut thanks a lot !

@RiverSongFox
Copy link

Hello, could you give me a hint about data format, please?

  • What is meaning of type in docs.json while there is name and slug?
  • What types/slug from index.json is used for?

@Thibaut
Copy link
Member

Thibaut commented Jun 5, 2016

Hey

What is meaning of type in docs.json while there is name and slug?

It determines which CSS and JS to use when displaying the doc in the app.

What types/slug from index.json is used for?

This kind of URL: http://devdocs.io/css-backgrounds-borders/

@dsevillamartin
Copy link

dsevillamartin commented Nov 27, 2016

Where exactly do you find the content of each page for the documentation with DevDocs' "API"?
I am trying to get MDN documentation for JavaScript, but all I see in docs.json is the page paths, in http://maxcdn-docs.devdocs.io/javascript/index.json it's the same but just for javascript, and http://maxcdn-docs.devdocs.io/javascript/db.json just gives an index page with all the content.

Thanks for the great service, by the way!

@Thibaut
Copy link
Member

Thibaut commented Nov 27, 2016

@datitisev DevDocs doesn't have an API. Individual pages are accessible via this type of URL: http://docs.devdocs.io/javascript/index.html?1475425795 (docs.devdocs.io + doc slug + entry path + .html + doc mtime), but I make no guarantee that this won't change in the future.

@dsevillamartin
Copy link

@Thibaut Oh, that's what I think I meant. I didn't know how I would get any of the data in the index.json.
Thanks for the url! And thanks, once again, for the great service. 👍

@astoff
Copy link
Contributor

astoff commented May 29, 2021

I wrote a DevDocs package for Emacs (https://github.com/astoff/evdocs/) which I've submitted for distribution in the usual channels.
As far as I can tell, I'm following all the guidelines for third-party apps mentioned above, and ample credit to devdocs.io is given. In any case, I thought it made sense to give you guys a heads up.

@MasterEnoc
Copy link
Contributor

@astoff Make a PR adding your project to the table in https://github.com/freeCodeCamp/devdocs#related-projects.

astoff added a commit to astoff/devdocs that referenced this issue Jun 2, 2021
@edno edno closed this as completed Nov 16, 2021
@laoshaw
Copy link

laoshaw commented Aug 3, 2022

I can find https://devdocs.io/docs/javascript/index.json but where is db.json located by URL path these days?

https://docs.devdocs.io/javascript/db.json -- docs.devdocs.io is unreachable

ok found it: documents.devdocs.io that is

@Strooss
Copy link

Strooss commented Feb 9, 2023

I can find https://devdocs.io/docs/javascript/index.json but where is db.json located by URL path these days?

https://docs.devdocs.io/javascript/db.json -- docs.devdocs.io is unreachable

ok found it: documents.devdocs.io that is

Does this link still works? it don't work for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests