-
Notifications
You must be signed in to change notification settings - Fork 11
Getting Started
lauren12292 edited this page Mar 14, 2016
·
7 revisions
You'll need a Rosette API key to start. Head to developer.rosette.com to start your 30-day trial of the Rosette API. Check out the documentation first, then find your API key in your developer portal and pass it in as a parameter every time your code opens an API connection.
Install the module with: npm install rosette-api
var rosette-api = require('rosette-api');
var api = new Api(API_KEY);
var endpoint = "language";
var content = "Por favor Señorita, says the man.";
api.parameters.content = content;
api.rosette(endpoint, function(err, res){
if(err){
console.log(err);
} else {
console.log(JSON.stringify(res, null, 2));
}
});
Voila! You should see the JSON output from the server indicating Spanish as the top result.
See examples for how to call each Rosette API endpoint using the binding. If you are familiar with Docker, see the docker directory for a docker image to run all the examples.
See Rosette API site or Rosette API Support.