DICT.dart

GET /

Description

Shows this page.

Response

Type: text/html

GET /define/:database/:word

Description

Retrieves the definitions for a word from a database.

URL Parameters

database (Optional)

The database to search for definitions in.

Defaults to * (search all available databases).

word (Required)

The word to retrieve the definitons for.

Response

Type: application/json

Returns an array of JSON objects. Each of the array items has the following keys:

word

The defined word.

database

A JSON object with the following keys:

name

Name of the database the definition was retrieved from.

description

Short description of the database.

text

The text of the definition.

GET /match/:database/:word

Description

Searches the index of a database for a word.

URL Parameters

database (Optional)

The database whose index should be searched.

Defaults to * (search all available databases).

word (Required)

The pattern to search for.

Query Parameters

strategy (Optional)

The search strategy.

Defaults to . (the default strategy of the specified database).

Response

Type: application/json

Returns an array of JSON objects. Each of the array items has the following keys:

word

The word which has been matched.

database

A JSON object with the following keys:

name

Name of the database the match was found in.

description

Short description of the database.

GET /match-define/:database/:word

Descripton

First performs a match, then retrieves definitions for each match. Use this command to reduce network traffic.

URL Parameters

database (Optional)

The database whose index should be searched.

Defaults to * (search all available databases).

word (Required)

The pattern to search for.

Query Parameters

strategy (Optional)

The search strategy.

Defaults to . (the default strategy of the specified database).

Response

Type: application/json

Returns an array of JSON objects. Each of the array items has the following keys:

word

The defined word.

database

A JSON object with the following keys:

name

Name of the database the definition was retrieved from.

description

Short description of the database.

text

The text of the definition.

GET /databases

Description

Gets a list of all available databases.

Response

Type: application/json

Returns an array of JSON objects. Each of the array items has the following keys:

name

Name of the database.

description

Short description of the database.

GET /strategies

Description

Gets a list of all available search strategies.

Response

Type: application/json

Returns an array of JSON objects. Each of the array items has the following keys:

name

Name of the search strategy.

description

Short description of the search strategy.

GET /info/:database

Description

Gets the source, copyright, and licensing information about the specified database.

URL Parameters

database (Required)

The name of the database to get the information about.

Response

Type: text/plain

GET /server

Description

Shows information about the DICT server.

Response

Type: text/plain

GET /help

Description

Shows a short summary of commands that are understood by the server.

Response

Type: text/plain