Many of the methods in the API are generic, i.e. they take a type class as argument and performs an action depending of the type.
Type classes
These are the available type classes for generic methods.
Name | Description |
---|---|
Dictionary | A dictionary for the current client |
Domain | A domain in the currently selected dictionary |
Language | A language in the currently selected dictionary |
Section | A section in the currently selected dictionary |
ConceptEntry | A concept entry in the currently selected dictionary |
TermEntry | A term entry in the currently selected dictionary |
Filter | A filter for the current client |
ImportSettings | An import settings for the current client |
VirtualFile | A virtual file (and also import file) for the current client |
Project | A project for the current client |
Client | A client in the system |
User | A user for the current client |
Generic methods
The table below describes the available generic methods. The type argument is the name of the type, and is a case-insensitive string.
The type name can also be appended by additional request parameters to modify the returned object.
Method | Applicable Types | Returns | Return type | Description |
---|---|---|---|---|
getAll(sessionID, type) | Client | List of objects | array | Returns all objects of the specified type that are available for the user. |
getSelected(sessionID, type) | Client | Object (see Data objects) | struct | Returns the currently selected object of the specified type. |
getObject(sessionID, type, objID) | Client | Object (see Data objects) | struct | Returns the object with specified ID and type. |
getObjectByName(sessionID, type, name) | Client | Object (see Data objects) | struct | Returns the object with specified ID and name. |
getSelectedList(sessionID, type) | Domain | List of objects | array | Returns a list of the currently selected object(s) of the specified type. |
setSelected(sessionID, type, objID) | Client | 0 | int | Sets the object with specified ID and type to be selected. |
setSelected(sessionID, type, idList) | Domain | 0 | int | Sets the objects with specified IDs and type to be selected. |
setAllSelected(sessionID, type) | Domain | 0 | int | Sets all objects of the specified type to be selected. |
isSelected(sessionID, type, objID) | Client | True if selected | boolean | Checks if the object with specified ID and type is selected. |
exists(sessionID, type, objID) | Client | True if exists | boolean | Checks if the object with specified ID and type exists. |
existsByName(sessionID, type, name) | Client | True if exists | boolean | Checks if the object with specified ID and type exists. |