-
Notifications
You must be signed in to change notification settings - Fork 0
API documentation
This is the API documentation for Inspire, version 1.0.
Inspire is a RESTful API-centric application, meaning you can do most anything with well crafted API requests.
Currently, 2 main operations are supported: getting and inserting words. Requests should go to the base URL (http://i.jaa.ee), followed by controller/action/id params, separated by slashes. The ID is an optional param and can be either numeric or textual. The API responds with JSON and always includes the following keys:
status – a numerical status code (see the Commoneer module). 200 means OK.
response – Contains meaningful info, depending on the request. for word/inspire, response contains the random word.
The following table explains how to communicate with the API.
|Controller|Action|ID|Method|Params|Example|Description|
|word|inspire|category_id|GET|None|http://i.jaa.ee/word/inspire/2 a random word, optionally restricted by category ID|
|word|add|None|POST|language_id (optional) int – The ID of the language the word belongs to
category_id int – Category ID
string string – The word (or sentence|-|Add a new word to the database|