translate

Requête

Permet de traduire une entrée. La réponse retourne un array d'objets word.

Endpoint

[Domain]/academy/api/v1/Dictionary/translate

Body

{
    "entry" : "uleza",
    "languages" : "fr"
}

Exemple

const endpoint = "[endpoint]";
const apiKey = "[myAPIKey]";

// Use the username and password to obtain data based on user rights
const username = "[username]"; // optionnel
const password = "[password]"; // optionnel

fetch(endpoint, {
    method: "POST",
    headers: {
        "Authorization": apiKey,
        "Content-Type": "application/json",
        "username ": username,
        "password ": password 
    },
    body: JSON.stringify({
        "entry" : "uleza",
        "languages" : "fr"
    })
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Erreur :", error));

Description des champs de la requête

Champ
Type
Description
Valeur

entry

string

L'entrée à traduire

requise

languages

string

La langue de traduction au format ISO 639-2

requise

Réponse

{
    "Dictionary": {
        "version": 7,
        "authorization": "all",
        "endValidity": "",
        "variety": "shiKomori",
        "entries": "1/1",
        "word": {
            "leza (u-)": [
                "rendre ivre",
                "anesthésier"
            ],
            "isShimaore": false,
            "isShimwali": false,
            "isShindzuani": false,
            "isShingazidja": true,
            "dialectSymbols": "◼"
        }
    }
    ...
}

Description des champs de la réponse

Champ
Type
Description

word

object

Objet word

Dernière mise à jour

Cet article vous a-t-il été utile ?