valadoc-org icon indicating copy to clipboard operation
valadoc-org copied to clipboard

Add an easy way to get the documentation from JSON

Open tintou opened this issue 9 years ago • 5 comments

It would be really nice if there were a static link, say "valadoc.org/packages.json" that contains the list of currently available packages in this way:

{
  "books": [
    {
      "name": "glib-2.0",
      "description": "GLib provides the core application building blocks for libraries and applications written in C. It provides the core object system used in GNOME, the main loop implementation, and a large set of utility functions for strings and common data structures.",
      "version": "2.51.2",
      "book_url": "https://valadoc.org/glib-2.0/glib-2.0.tar.bz2"
    },
    {
      "name": "gio-2.0",
      "description": "GIO provides a modern and easy-to-use VFS API. It provides a file system abstraction which allows applications to access local and remote files with a single consistent API.",
      "version": "2.51.2",
      "book_url": "https://valadoc.org/gio-2.0/gio-2.0.tar.bz2"
    }
  ]
}

So that it's possible to list the available packages to users in order to use them offline.

tintou avatar Feb 13 '17 22:02 tintou

After some more investigation, it seems that it's possible to use the file https://valadoc.org/index.htm.content.tpl (XML but it's okay) only the version info isn't available but it's not processed either.

tintou avatar Feb 15 '17 18:02 tintou

Once we merge the backend rewrite, I'll write a API specification for distributing package docs in JSON. There's some work on a Valadoc doclet that would generate JSON which would then ideally be served in JSON-API payloads.

arteymix avatar Mar 01 '17 00:03 arteymix

@arteymix any progress on that JSON API?

ZanderBrown avatar Jun 09 '17 14:06 ZanderBrown

@ZanderBrown It's still at a specification stage for now..

arteymix avatar Jun 11 '17 01:06 arteymix

Okay, any ideas when it might be available for real?

ZanderBrown avatar Jun 11 '17 10:06 ZanderBrown