File tree Expand file tree Collapse file tree 2 files changed +30
-1
lines changed
Expand file tree Collapse file tree 2 files changed +30
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,6 @@ in the [examples](https://github.com/rosette-api/nodejs/tree/develop/examples) d
3434- [ Rosette Platform API] ( https://developer.rosette.com/features-and-functions )
3535- [ Binding Release Notes] ( https://github.com/rosette-api/nodejs/wiki/Release-Notes )
3636- [ Rosette Platform Release Notes] ( https://support.rosette.com/hc/en-us/articles/360018354971-Release-Notes )
37- - [ Binding/Rosette Platform Compatibility] ( https://developer.rosette.com/features-and-functions?nodejs# )
3837- [ Support] ( https://support.rosette.com )
3938- [ Binding License: Apache 2.0] ( https://github.com/rosette-api/nodejs/blob/develop/LICENSE.txt )
4039
Original file line number Diff line number Diff line change 1+ ## Endpoint Examples
2+
3+ Each example file demonstrates one of the capabilities of the Rosette Platform.
4+
5+ ## Docker ##
6+ A Docker image for running the examples against the compiled source library is available on Docker Hub.
7+
8+ Command: ` docker run -e API_KEY=api-key -v "<binding root directory>:/source" rosetteapi/docker-nodejs `
9+
10+ Additional environment settings:
11+ ` -e ALT_URL=<alternative URL> `
12+ ` -e FILENAME=<single filename> `
13+
14+ ## Example using the Rosette API language detection endpoint
15+ ``` javascript
16+ var Api = require (' rosette-api' );
17+
18+ var api = new Api (API_KEY );
19+ var endpoint = " language" ;
20+ var content = " Por favor Señorita, says the man." ;
21+ api .parameters .content = content;
22+
23+ api .rosette (endpoint, function (err , res ){
24+ if (err){
25+ console .log (err);
26+ } else {
27+ console .log (JSON .stringify (res, null , 2 ));
28+ }
29+ });
30+ ```
You can’t perform that action at this time.
0 commit comments