crowdin-cli
Advanced tools
Comparing version
16
api.js
@@ -19,2 +19,7 @@ /*jslint node: true*/ | ||
var url = baseUrl + '/api/' + apiUrl + '?json=true&key=' + apiKey; | ||
if (verbose > 0) { | ||
console.log("Doing GET request:"); | ||
console.log(url); | ||
} | ||
return request.get(url, function (error, response, body) { | ||
@@ -32,2 +37,7 @@ if (!error && response.statusCode === 200) { | ||
var url = baseUrl + '/api/' + apiUrl + '?json=true&key=' + apiKey; | ||
if (verbose > 0) { | ||
console.log("Doing POST request:"); | ||
console.log(url); | ||
} | ||
return request.post(url, function (error, response, body) { | ||
@@ -91,3 +101,9 @@ if (!error && response.statusCode === 200) { | ||
getApiCall('project/' + projectName + '/export', callback); | ||
}, | ||
/** | ||
* Download Crowdin project glossaries as TBX file. | ||
*/ | ||
downloadGlossary: function (projectName) { | ||
return getApiRequest('project/' + projectName + '/download-glossary'); | ||
} | ||
}; |
{ | ||
"name": "crowdin-cli", | ||
"version": "0.1.0", | ||
"version": "0.2.0", | ||
"description": "NodeJS client for Crowdin", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
127
12.39%10831
-99.81%7
-36.36%