Crowdin JS API Client live demo
const crowdin = require("@crowdin/crowdin-api-client")
const {
projectsGroupsApi,
languagesApi
} = new crowdin.default({
token: process.env.accessToken,
organization: process.env.organization
});
languagesApi.listSupportedLanguages({limit: 5})
.then(languages => {
console.log('Languages list:');
console.log(languages);
})
.catch(error => console.error(error));
languagesApi.getLanguage('uk')
.then(language => {
console.log('Ukrainian language data:');
console.log(language.data);
})
.catch(error => console.error(error));
projectsGroupsApi.listProjects()
.then(projects => {
console.log('Projects list:');
console.log(projects);
})
.catch(error => console.error(error));
no comments