|
1 | | -# Aspose.BarCode Cloud SDK for Node.js |
2 | | -Aspose.BarCode for Cloud is a REST API for Linear, 2D and postal barcode generation and recognition in the cloud. API recognizes and generates barcode images in a variety of formats. Barcode REST API allows to specify barcode image attributes like image width, height, border style and output image format in order to customize the generation process. Developers can also specify the barcode type and text attributes such as text location and font styles in order to suit the application requirements. |
| 1 | +# Aspose.BarCode Cloud SDK for Node.js |
| 2 | + |
| 3 | ++ API version: 3.0 |
| 4 | ++ Package version: 20.5.0 |
3 | 5 |
|
4 | | -This repository contains Aspose.BarCode Cloud SDK for Node.js source code. |
| 6 | +Aspose.BarCode for Cloud is a REST API for Linear, 2D and postal barcode generation and recognition in the cloud. API recognizes and generates barcode images in a variety of formats. Barcode REST API allows to specify barcode image attributes like image width, height, border style and output image format in order to customize the generation process. Developers can also specify the barcode type and text attributes such as text location and font styles in order to suit the application requirements. |
5 | 7 |
|
| 8 | +This repository contains Aspose.BarCode Cloud SDK for Node.js source code. |
6 | 9 |
|
7 | 10 | To use these SDKs, you will need App SID and App Key which can be looked up at [Aspose Cloud Dashboard](https://dashboard.aspose.cloud/#/apps) (free registration in Aspose Cloud is required for this). |
8 | 11 |
|
9 | | -## How to use the SDK? |
| 12 | +## How to use the SDK |
| 13 | + |
10 | 14 | The complete source code is available in this repository folder. You can either directly use it in your project via source code or get [nmpjs distribution](https://www.npmjs.com/package/aspose-barcode-cloud-node) (recommended). |
11 | 15 |
|
12 | 16 | ### Install Aspose.BarCode for Cloud via NPM |
13 | 17 |
|
14 | 18 | From the command line: |
15 | 19 |
|
16 | | - npm install aspose-barcode-cloud-node --save |
17 | | - |
| 20 | +```sh |
| 21 | +npm install aspose-barcode-cloud-node --save |
| 22 | +``` |
18 | 23 |
|
19 | 24 | ### Sample usage |
20 | 25 |
|
21 | 26 | The examples below show how your application have to generate PDF417 barcode and save it on local storage: |
22 | | -``` js |
23 | | -const { barcode, fs } = require("aspose-barcode-cloud-node", "fs"); |
24 | 27 |
|
25 | | -var api = new barcode.BarCodeApi(AppSid, AppKey); |
| 28 | +```js |
| 29 | +const fs = require('fs'); |
| 30 | +const Barcode = require('aspose-barcode-cloud-node'); |
26 | 31 |
|
27 | | -api.barCodeGetBarCodeGenerate("Aspose.BarCode for Cloud Sample", "Pdf417", "png").then((apiResult) => { |
28 | | - if (apiResult.response.statusCode == 200) { |
29 | | - fs.writeFile("out.png", apiResult.body); |
30 | | - console.log("Saved to out.png "); |
31 | | - } |
32 | | - }); |
| 32 | +const config = new Barcode.Configuration( |
| 33 | + 'App SID from https://dashboard.aspose.cloud/#/apps', |
| 34 | + 'App Key from https://dashboard.aspose.cloud/#/apps' |
| 35 | +); |
33 | 36 |
|
| 37 | +async function generate(api) { |
| 38 | + const oneBarcode = await api.getBarcodeGenerate( |
| 39 | + Barcode.EncodeBarcodeType.Pdf417, |
| 40 | + 'Aspose.BarCode for Cloud Sample' |
| 41 | + ); |
| 42 | + |
| 43 | + fs.writeFileSync('out.png', oneBarcode.body); |
| 44 | + console.log('Saved to out.png'); |
| 45 | +} |
| 46 | + |
| 47 | +const api = new Barcode.BarcodeApi(config); |
| 48 | +generate(api).catch(err => console.error(err)); |
34 | 49 | ``` |
35 | 50 |
|
36 | 51 | Every method returns a chainable promise. |
37 | 52 |
|
38 | | -# Licensing |
| 53 | +## Licensing |
| 54 | + |
39 | 55 | All Aspose.BarCode for Cloud SDKs, helper scripts and templates are licensed under [MIT License](LICENSE). |
40 | 56 |
|
41 | | -# Resources |
| 57 | +## Resources |
| 58 | + |
42 | 59 | + [**Website**](https://www.aspose.cloud) |
43 | 60 | + [**Product Home**](https://products.aspose.cloud/barcode/cloud) |
44 | 61 | + [**Documentation**](https://docs.aspose.cloud/display/barcodecloud/Home) |
45 | 62 | + [**Free Support Forum**](https://forum.aspose.cloud/c/barcode) |
46 | 63 | + [**Paid Support Helpdesk**](https://helpdesk.aspose.cloud/) |
47 | 64 | + [**Blog**](https://blog.aspose.cloud/category/aspose-products/aspose-barcode-product-family/) |
| 65 | + |
| 66 | +## Documentation for API Endpoints |
| 67 | + |
| 68 | +All URIs are relative to *<https://api.aspose.cloud/v3.0/>* |
| 69 | + |
| 70 | +Class | Method | HTTP request | Description |
| 71 | +----- | ------ | ------------ | ----------- |
| 72 | +BarcodeApi | [**getBarcodeGenerate**](docs/index.md#getbarcodegenerate) | **GET** /barcode/generate | Generate barcode. |
| 73 | +BarcodeApi | [**getBarcodeRecognize**](docs/index.md#getbarcoderecognize) | **GET** /barcode/{name}/recognize | Recognize barcode from a file on server. |
| 74 | +BarcodeApi | [**postBarcodeRecognizeFromUrlOrContent**](docs/index.md#postbarcoderecognizefromurlorcontent) | **POST** /barcode/recognize | Recognize barcode from an url or from request body. Request body can contain raw data bytes of the image or encoded with base64. |
| 75 | +BarcodeApi | [**postGenerateMultiple**](docs/index.md#postgeneratemultiple) | **POST** /barcode/generateMultiple | Generate multiple barcodes and return in response stream |
| 76 | +BarcodeApi | [**putBarcodeGenerateFile**](docs/index.md#putbarcodegeneratefile) | **PUT** /barcode/{name}/generate | Generate barcode and save on server (from query params or from file with json or xml content) |
| 77 | +BarcodeApi | [**putBarcodeRecognizeFromBody**](docs/index.md#putbarcoderecognizefrombody) | **PUT** /barcode/{name}/recognize | Recognition of a barcode from file on server with parameters in body. |
| 78 | +BarcodeApi | [**putGenerateMultiple**](docs/index.md#putgeneratemultiple) | **PUT** /barcode/{name}/generateMultiple | Generate image with multiple barcodes and put new file on server |
| 79 | +FileApi | [**copyFile**](docs/index.md#copyfile) | **PUT** /barcode/storage/file/copy/{srcPath} | Copy file |
| 80 | +FileApi | [**deleteFile**](docs/index.md#deletefile) | **DELETE** /barcode/storage/file/{path} | Delete file |
| 81 | +FileApi | [**downloadFile**](docs/index.md#downloadfile) | **GET** /barcode/storage/file/{path} | Download file |
| 82 | +FileApi | [**moveFile**](docs/index.md#movefile) | **PUT** /barcode/storage/file/move/{srcPath} | Move file |
| 83 | +FileApi | [**uploadFile**](docs/index.md#uploadfile) | **PUT** /barcode/storage/file/{path} | Upload file |
| 84 | +FolderApi | [**copyFolder**](docs/index.md#copyfolder) | **PUT** /barcode/storage/folder/copy/{srcPath} | Copy folder |
| 85 | +FolderApi | [**createFolder**](docs/index.md#createfolder) | **PUT** /barcode/storage/folder/{path} | Create the folder |
| 86 | +FolderApi | [**deleteFolder**](docs/index.md#deletefolder) | **DELETE** /barcode/storage/folder/{path} | Delete folder |
| 87 | +FolderApi | [**getFilesList**](docs/index.md#getfileslist) | **GET** /barcode/storage/folder/{path} | Get all files and folders within a folder |
| 88 | +FolderApi | [**moveFolder**](docs/index.md#movefolder) | **PUT** /barcode/storage/folder/move/{srcPath} | Move folder |
| 89 | +StorageApi | [**getDiscUsage**](docs/index.md#getdiscusage) | **GET** /barcode/storage/disc | Get disc usage |
| 90 | +StorageApi | [**getFileVersions**](docs/index.md#getfileversions) | **GET** /barcode/storage/version/{path} | Get file versions |
| 91 | +StorageApi | [**objectExists**](docs/index.md#objectexists) | **GET** /barcode/storage/exist/{path} | Check if file or folder exists |
| 92 | +StorageApi | [**storageExists**](docs/index.md#storageexists) | **GET** /barcode/storage/{storageName}/exist | Check if storage exists |
0 commit comments