Skip to content

RESTful API

Bryan Oakley edited this page Jul 20, 2014 · 1 revision

Overview

The hub provides a RESTful interface to return information about keywords. The interface closely matches the URL scheme used for displaying the documentation in the website. Following are typical URLs:

You can search through all keywords, or the keywords in a library, by giving the pattern argument. Search patterns match anywhere in the string. To search for a keyword that begins with a string, prefix the pattern with a caret. To search for a keyword that ends with a pattern, append a dollar sign.

Data format

When searching for a list of keywords, the data will be returned in the following JSON format:

{
 "keywords": [
    {
      "api_keyword_url": "...", 
      "api_library_url": "...", 
      "args": "[\"text=\"]", 
      "doc": "...", 
      "htmldoc": "...", 
      "library": "...", 
      "name": "...", 
      "synopsis": "..."
    }, 
    {...}, ...
  ]
}

When fetching the results for a single keyword, the data is in the following format:

{
  "args": [..], 
  "doc": "...", 
  "library": "...", 
  "library_url": "...", 
  "name": "..."
}
Clone this wiki locally