Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
@vviital/wooordhunter-api
Advanced tools
This package provide asyncronize API for WooordHunt service for word translation.
To add this package to the project just run command:
yarn add @vviital/wooordhunter-api
This package provide API for word translation and getting word tips. You can translate in both directions:
const WooordhuntAPI = require('@vviital/wooordhunter-api');
const options = { apiUri: 'https://wooordhunt.ru' };
const API = new WooordhuntAPI(options);
API
.fetchWordTranslation('test')
.then(translation => {
console.log(translation);
});
Right now options has only one mandatory parameter apiUri which should have value https://wooordhunt.ru
Data in response depends on languge of requested word. Generally response have such format:
{
commonMeanings: string[],
language: 'english|russian',
mainMeaning: string,
nouns: string[],
phrases: string[],
transcription: {
uk: string,
us: string,
},
verbs: string[],
word: string
}
const WooordhuntAPI = require('@vviital/wooordhunter-api');
const options = { apiUri: 'https://wooordhunt.ru' };
const API = new WooordhuntAPI(options);
API
.fetchTips('test')
.then(tips => {
console.log(tips);
});
Generally response have such format:
[
{
word: string,
translation: string
},
...
{
word: string,
translation: string
}
]
Generally you don't need this method
Actually WooordhunterAPI is a singelton and because of this we sometimes need to have possibility to reconfigure it. To do it - just invoke reconfigure
method.
const WooordhuntAPI = require('@vviital/wooordhunter-api');
const wrongOptions = { apiUri: 'http://example.com' };
const API = new WooordhuntAPI(options);
const correctOptions = { apiUri: 'https://wooordhunt.ru' };
API.reconfigure(correctOptions); // Now API has correct configuration
FAQs
## Motivation
The npm package @vviital/wooordhunter-api receives a total of 0 weekly downloads. As such, @vviital/wooordhunter-api popularity was classified as not popular.
We found that @vviital/wooordhunter-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.