0.0.18 • Published 5 months ago

@vanakaru/ekilex-api-client v0.0.18

Weekly downloads
-
License
ISC
Repository
-
Last release
5 months ago

EKILEX-NODEJS-API-CLIENT

Status

This NodeJs API-Client is still WIP

Getting started

To install this package, you can run this on your terminal:

npm install @vanakaru/ekilex-api-client
import { EkilexClient } from '@vanakaru/ekilex-api-client';

Next, configure the library - you'll need an API-KEY in advance:

import { EkilexClient } from '@vanakaru/ekilex-api-client';

const ekilexClient = new EkilexClient({
	apiKey: '123456789', // api key from your ekilex user profile page
	environment: 'prod', // or 'test' depending in which environment you created your key
});

const result = await ekilexClient.words.search('tubli', ['eki']);

/* Example Response
{
    "totalCount": 1,
    "words": [
        {
            "wordId": 247445,
            "wordValue": "tubli",
            "wordValuePrese": "tubli",
            "homonymNr": 1,
            "lang": "est",
            "datasetCodes": [
                "eki",
                "les"
            ],
            ...
        }
    ]
}
*/

// Retrieve WordId from result
const wordId = result.words[0].wordId;

const wordDetails = await ekilexClient.words.getDetails(wordId);

/* Example Response
{
    "word": {
        "wordId": 247445,
        "wordValue": "tubli",
        "wordValuePrese": "tubli",
        "homonymNr": 1,
        "lang": "est",
        "morphophonoForm": "tubli",
        "prefixoid": false,
        "suffixoid": false,
        "foreign": false,
        "lexemesTagNames": [
            "kakskeelne: vaste puudub (prantsuse)",
            "koostamisel",
            "süno valmis"
        ],
        "lastActivityEventOn": "2022-10-27T22:31:01.177+00:00",
        "manualEventOn": "2022-10-27T22:31:01.177+00:00"
    },
    "wordTypes": [...],
    "paradigms": [...],
    "lexemes": [...],
    "wordEtymology": [...],
    "odWordRecommendations": [...],
    "wordRelationDetails": {...}
}

*/
0.0.18

5 months ago

0.0.17

5 months ago

0.0.16

5 months ago

0.0.15

10 months ago

0.0.14

10 months ago

0.0.13

11 months ago

0.0.12

11 months ago

0.0.11

11 months ago

0.0.10

11 months ago

0.0.9

1 year ago

0.0.8

1 year ago

0.0.7

1 year ago

0.0.6

1 year ago

0.0.5

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago