Skip to content

Commit f909892

Browse files
Update readme.md
1 parent 2910300 commit f909892

1 file changed

Lines changed: 3 additions & 19 deletions

File tree

readme.md

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,10 @@ npm install pdf-generator-api --save
1010

1111
### Usage
1212
```javascript
13-
let Client = new PDFGeneratorAPI(
14-
'{your_api_key}',
15-
'{your_api_secret}'
16-
);
17-
Client.setBaseUrl('https://us1.pdfgeneratorapi.com/api/v3/');
18-
Client.setWorkspace('{unique_workspace_identifier}');
19-
20-
Client.getAll().then(function(response) {
21-
// response.response => list of templates available for users
22-
});
2313

24-
Client.output('{template_id_retrived_with_getAll}', {"key": "Object, Array or url to data file"}).then(function(response) {
25-
// response.response => base64 document
26-
// response.meta => document meta data e.g name, content-type, encoding etc
27-
});
28-
```
29-
```NodeJS
30-
31-
const pdf = require('pdf-generator-api')
14+
const PDFGeneratorAPI = require('pdf-generator-api')
3215

33-
let Client = new pdf(
16+
let Client = new PDFGeneratorAPI(
3417
'{your_api_key}',
3518
'{your_api_secret}'
3619
);
@@ -45,3 +28,4 @@ Client.output('{template_id_retrived_with_getAll}', {"key": "Object, Array or ur
4528
// response.response => base64 document
4629
// response.meta => document meta data e.g name, content-type, encoding etc
4730
});
31+
```

0 commit comments

Comments
 (0)