Skip to content

Commit d5b0945

Browse files
author
Kathy Czeck
committed
new README.md
for examples
1 parent 2c9e3a3 commit d5b0945

File tree

2 files changed

+30
-1
lines changed

2 files changed

+30
-1
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff 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

examples/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
```

0 commit comments

Comments
 (0)