You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
lauren12292 edited this page Mar 14, 2016
·
7 revisions
Get Rosette API Access
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 from NPM
Install the module with: npm install rosette-api
Run the language detection example
varrosette-api=require('rosette-api');varapi=newApi(API_KEY);varendpoint="language";varcontent="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.
Additional Examples
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.