txt_translate
Advanced tools
Comparing version 1.0.1 to 1.0.2
@@ -6,3 +6,6 @@ var request = require("request"); | ||
url: 'https://x-api.herokuapp.com/translate', | ||
qs: { api: 'watson' }, | ||
qs: { | ||
api: 'watson', | ||
api_key: 'api key' | ||
}, | ||
headers: | ||
@@ -17,3 +20,3 @@ { | ||
module.exports.translate = function (from, text, to, api = 'watson', callback) { | ||
module.exports.translate = function (from, text, to, api_key, api = 'watson', callback) { | ||
options.body.from = from; | ||
@@ -23,2 +26,3 @@ options.body.to = to; | ||
options.qs.api = api; | ||
options.qs.api_key = api_key; | ||
@@ -25,0 +29,0 @@ request(options, function (error, response, body) { |
{ | ||
"name": "txt_translate", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "translate text", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
var tt = require('./index.js'); | ||
tt.translate("en", "thankyou", "ja", api="azure", (data)=>{ | ||
tt.translate("en", "thankyou", "ja","qwertyasdf", api="azure", (data)=>{ | ||
console.log(data); | ||
}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No README
QualityPackage does not have a README. This may indicate a failed publish or a low quality package.
Found 1 instance in 1 package
1232
4
30
1
3