|
| 1 | +# GroupDocs.Annotation Cloud Node.js SDK |
| 2 | +Node.js module for communicating with the GroupDocs.Annotation Cloud API |
| 3 | + |
| 4 | +## Installation |
| 5 | + |
| 6 | +A package `groupdocs-annotation-cloud` is available at [npmjs.com](https://www.npmjs.com/package/groupdocs-annotation-cloud). You can install it with: |
| 7 | + |
| 8 | +```shell |
| 9 | +npm install groupdocs-annotation-cloud |
| 10 | +``` |
| 11 | + |
| 12 | +## Getting Started |
| 13 | + |
| 14 | +Please follow the [installation](#installation) procedure and then run the following JavaScript code: |
| 15 | + |
| 16 | +```js |
| 17 | +// load the module |
| 18 | +var GroupDocs = require('groupdocs-annotation-cloud'); |
| 19 | + |
| 20 | +// get your appSid and appKey at https://dashboard.groupdocs.cloud (free registration is required). |
| 21 | +var appSid = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; |
| 22 | +var appKey = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; |
| 23 | + |
| 24 | +// construct AnnotationApi |
| 25 | +var infoApi = GroupDocs.InfoApi.fromKeys(appSid, appKey); |
| 26 | + |
| 27 | +// retrieve supported file-formats |
| 28 | +infoApi.getSupportedFileFormats() |
| 29 | + .then(function (response) { |
| 30 | + console.log("Supported file-formats:") |
| 31 | + response.formats.forEach(function (format) { |
| 32 | + console.log(format.fileFormat + " (" + format.extension + ")"); |
| 33 | + }); |
| 34 | + }) |
| 35 | + .catch(function (error) { |
| 36 | + console.log("Error: " + error.message) |
| 37 | + }); |
| 38 | +``` |
| 39 | + |
| 40 | +Or compile and run same written in TypeScript: |
| 41 | + |
| 42 | +```ts |
| 43 | +// load the module |
| 44 | +import { InfoApi } from "groupdocs-annotation-cloud"; |
| 45 | + |
| 46 | +// get your appSid and appKey at https://dashboard.groupdocs.cloud (free registration is required). |
| 47 | +const appSid: string = "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"; |
| 48 | +const appKey: string = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"; |
| 49 | + |
| 50 | +// construct AnnotationApi |
| 51 | +const infoApi: InfoApi = InfoApi.fromKeys(appSid, appKey); |
| 52 | + |
| 53 | +// retrieve supported file-formats |
| 54 | +infoApi.getSupportedFileFormats() |
| 55 | + .then((result) => { |
| 56 | + console.log("Supported file-formats:"); |
| 57 | + result.formats.forEach((format) => { |
| 58 | + console.log(format.fileFormat + " (" + format.extension + ")"); |
| 59 | + }); |
| 60 | + }) |
| 61 | + .catch((error) => { |
| 62 | + console.log("Error: " + error.message); |
| 63 | + }); |
| 64 | +``` |
| 65 | + |
| 66 | + |
| 67 | +## Licensing |
| 68 | +GroupDocs.Annotation Cloud Node.js SDK licensed under [MIT License](LICENSE). |
| 69 | + |
| 70 | +## Resources |
| 71 | ++ [**Website**](https://www.groupdocs.cloud) |
| 72 | ++ [**Product Home**](https://products.groupdocs.cloud/annotation) |
| 73 | ++ [**Documentation**](https://docs.groupdocs.cloud/display/annotationcloud/Home) |
| 74 | ++ [**Free Support Forum**](https://forum.groupdocs.cloud/c/annotation) |
| 75 | ++ [**Blog**](https://blog.groupdocs.cloud/category/annotation) |
| 76 | + |
| 77 | +## Contact Us |
| 78 | +Your feedback is very important to us. Please feel free to contact us using our [Support Forums](https://forum.groupdocs.cloud/c/annotation). |
0 commit comments