Skip to content

Commit 8b09eea

Browse files
committed
Remove all references to Secret and ApiKey #93
1 parent 9832c97 commit 8b09eea

10 files changed

+24
-24
lines changed

README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,26 +16,26 @@ npm install convertapi --save
1616

1717
## Usage
1818

19-
The package needs to be configured with your account's secret key or token which is available at https://www.convertapi.com/a
19+
The package needs to be configured with your account's token which is available at https://www.convertapi.com/a/authentication
2020

2121
Require it with the key's value:
2222

2323
```javascript
24-
var convertapi = require('convertapi')('your-api-secret-or-token');
24+
var convertapi = require('convertapi')('api-token');
2525
```
2626

2727
Or using ES modules:
2828

2929
```javascript
3030
import ConvertAPI from 'convertapi';
3131

32-
const convertapi = new ConvertAPI('your-api-secret-or-token');
32+
const convertapi = new ConvertAPI('api-token');
3333
```
3434

3535
You can specify additional options, like proxy configuration and timeouts, when initializing the client:
3636

3737
```javascript
38-
var convertapi = require('convertapi')('your-api-secret-or-token', {
38+
var convertapi = require('convertapi')('api-token', {
3939
conversionTimeout: 60,
4040
uploadTimeout: 60,
4141
downloadTimeout: 60,
@@ -54,7 +54,7 @@ var convertapi = require('convertapi')('your-api-secret-or-token', {
5454
If using ES module:
5555

5656
```javascript
57-
const convertapi = new ConvertAPI('your-api-secret-or-token', { conversionTimeout: 60 });
57+
const convertapi = new ConvertAPI('api-token', { conversionTimeout: 60 });
5858
```
5959

6060
### File conversion
@@ -147,7 +147,7 @@ convertapi
147147
Set `base_uri` parameter to use other service domains. Dedicated to the region [domain list](https://www.convertapi.com/doc/servers-location).
148148

149149
```js
150-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET, { baseUri: 'https://eu-v2.convertapi.com/' });
150+
var convertapi = require('../lib')(process.env.API_TOKEN, { baseUri: 'https://eu-v2.convertapi.com/' });
151151
```
152152

153153
### More examples

examples/conversion_chaining.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Short example of conversions chaining, the PDF pages extracted and saved as separated JPGs and then ZIP'ed
77
// https://www.convertapi.com/doc/chaining

examples/convert_base64_content.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Example of using buffer and stream to convert base64 encoded content to pdf
77
// https://www.convertapi.com/png-to-pdf

examples/convert_stream.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
var fs = require('fs');
44

5-
// set your api secret or token
6-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
5+
// set your api token
6+
var convertapi = require('../lib')(process.env.API_TOKEN);
77

88
// Example of using readable stream to convert to pdf
99
// https://www.convertapi.com/docx-to-pdf

examples/convert_url_to_pdf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Example of converting Web Page URL to PDF file
77
// https://www.convertapi.com/web-to-pdf

examples/convert_word_to_pdf_and_png.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Example of saving Word docx to PDF and to PNG
77
// https://www.convertapi.com/docx-to-pdf

examples/create_pdf_thumbnail.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Example of extracting first page from PDF and then chaining conversion PDF page to JPG.
77
// https://www.convertapi.com/pdf-to-extract

examples/get_result_file_stream.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Example of converting Web Page URL to PDF and reading file data as string
77
// https://www.convertapi.com/web-to-pdf

examples/retrieve_user_information.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Retrieve user information
77
// https://www.convertapi.com/doc/user

examples/split_and_merge_pdf.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* eslint-disable no-console */
22

3-
// set your api secret or token
4-
var convertapi = require('../lib')(process.env.CONVERT_API_SECRET);
3+
// set your api token
4+
var convertapi = require('../lib')(process.env.API_TOKEN);
55

66
// Example of extracting first and last pages from PDF and then merging them back to new PDF.
77
// https://www.convertapi.com/pdf-to-split

0 commit comments

Comments
 (0)