Learning with Texts - Fork
2.10.0-fork
Learn foreign languages with texts
|
This documentation provides an overview of the REST API endpoints available for LWT-community. The LWT API allows developers to interact with various features of the application, such as retrieving media paths, getting sentences containing a specific term, managing settings, and more.
The base URL for all API endpoints is: http://[base_url]/api/v1
, where base_url
is your instance URL (e. g. localhost:8080
).
Currently, the LWT API does not require authentication. However, authentication might be implemented in the future. Ensure that appropriate security measures are implemented on the client-side to protect user data.
The REST API should follow semantic versioning. In the API URL, v1
indicates "MAJOR version 1", and so on for the future versions. A track of all changes is kept in the CHANGELOG.md.
Retrieves the files paths to the audio and video files in the media folder.
/media-files
Retrieves how word should be read for a specific language.
/languages/{lang-id}/reading-configuration
Retrieves the phonetic reading for any specified term.
/phonetic-reading
text
and (lang
or lg_id
).Retrieves the next word to be reviewed.
/review/next-word
test_key
, selection
, word_mode
, lg_id
, word_regex
, type
Retrieves the number of reviews scheduled for tomorrow.
/review/tomorrow-count
test_key
and selection
Retrieves sentences that contain the specified term.
/sentences-with-term
lg_id
, word_lc
, and advanced_search
(optional)Retrieves sentences that contain the specified term.
/sentences-with-term/{term-id}
lg_id
and word_lc
Retrieves terms similar to the specified term.
/similar-terms
lg_id
and term
Retrieves the path for a file using the user theme.
/settings/theme-path
path
Retrieves the terms that were imported.
/terms/imported
last_update
, page
and count
Retrieves the translations for a specific term.
/terms/{term-id}/translations
text_id
and term_lc
Retrieves statistics for multiple texts.
/texts/statistics
texts_id
Retrieves the version of the LWT API.
/version
Saves user settings.
/settings
key
and value
Sets the annotation for a specific text.
/texts/{text-id}/annotation
elem
and data
Updates the audio position for a specific text.
/texts/{text-id}/audio-position
position
Updates the reading position for a specific text.
/texts/{text-id}/reading-position
position
Decrements the status of a term.
/terms/{term-id}/status/down
Increments the status of a term.
/terms/{term-id}/status/up
Sets the status of a term to a new value.
/terms/{term-id}/status/{new-status}
Add a translation for an existing term.
/terms/{term-id}/translations
translation
Adds a new translation for a term.
/terms/new
term_text
, lg_id
and translation
All API endpoints return responses in JSON format.