Home Reference Source
import MatildaAPI from 'matilda-apiclient'
public class | source

MatildaAPI

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public

apiBase: *

Method Summary

Public Methods
public

getDictionary(word: string, source: string, target: array): Promise

Get the dictionary of a word

public

Get a list of all supported languages

public

getWord(word: string, lang: string): Promise

Get a word

Public Constructors

public constructor() source

Public Members

public apiBase: * source

Public Methods

public getDictionary(word: string, source: string, target: array): Promise source

Get the dictionary of a word

Params:

NameTypeAttributeDescription
word string

The word to translate

source string

The source language

target array

The target language

Return:

Promise

public getLanguages(): Promise source

Get a list of all supported languages

Return:

Promise

public getWord(word: string, lang: string): Promise source

Get a word

Params:

NameTypeAttributeDescription
word string

The word to translate

lang string

The language of the word

Return:

Promise