File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,8 +20,20 @@ npm i --save @ionos-cloud/sdk-nodejs-dbaas-postgres
2020```
2121
2222## Usage
23+ Import the SDK using:
2324
24- ``` typescript
25+ ``` javascript
26+ const sdk = require (' @ionos-cloud/sdk-nodejs-dbaas-postgres' )
27+ ```
28+
29+ Or, if the import is done from an ES module, use:
30+
31+ ``` javascript
32+ import * as sdk from ' @ionos-cloud/sdk-nodejs-dbaas-postgres' ;
33+ ```
34+
35+ Usage example:
36+ ``` javascript
2537const sdk = require (' @ionos-cloud/sdk-nodejs-dbaas-postgres' )
2638
2739const config = new sdk.Configuration ({username: ' username_here' , password: ' password_here' });
@@ -35,7 +47,7 @@ clustersApi.clustersGet().then((response) => console.log(response));
3547
3648The username and password or the authentication token can be manually specified when initializing the SDK client:
3749
38- ``` typescript
50+ ``` javascript
3951const config = new sdk.Configuration ({username: ' username_here' , password: ' password_here' });
4052const clustersApi = new sdk.ClustersApi (config);
4153```
@@ -46,10 +58,10 @@ Environment variables can also be used; the SDK uses the following variables:
4658* IONOS\_ PASSWORD - to specify the password
4759* IONOS\_ TOKEN - if an authentication token is being used
4860
49- In this case, the client configuration must be initialized using ` NewConfigurationFromEnv ()`
61+ In this case, the client configuration must be initialized using ` fromEnv ()` :
5062
51- ``` typescript
52- client : = new sdk .ClustersApi (sdk .NewConfigurationFromEnv ())
63+ ``` javascript
64+ const client = new sdk.ClustersApi (sdk .Configuration . fromEnv ());
5365```
5466
5567{% hint style="danger" %}
Original file line number Diff line number Diff line change @@ -17,8 +17,20 @@ npm i --save @ionos-cloud/sdk-nodejs-dbaas-postgres
1717```
1818
1919## Usage
20+ Import the SDK using:
2021
21- ``` typescript
22+ ``` javascript
23+ const sdk = require (' @ionos-cloud/sdk-nodejs-dbaas-postgres' )
24+ ```
25+
26+ Or, if the import is done from an ES module, use:
27+
28+ ``` javascript
29+ import * as sdk from ' @ionos-cloud/sdk-nodejs-dbaas-postgres' ;
30+ ```
31+
32+ Usage example:
33+ ``` javascript
2234const sdk = require (' @ionos-cloud/sdk-nodejs-dbaas-postgres' )
2335
2436const config = new sdk.Configuration ({username: ' username_here' , password: ' password_here' });
@@ -32,7 +44,7 @@ clustersApi.clustersGet().then((response) => console.log(response));
3244
3345The username and password or the authentication token can be manually specified when initializing the SDK client:
3446
35- ``` typescript
47+ ``` javascript
3648const config = new sdk.Configuration ({username: ' username_here' , password: ' password_here' });
3749const clustersApi = new sdk.ClustersApi (config);
3850```
@@ -43,10 +55,10 @@ Environment variables can also be used; the SDK uses the following variables:
4355* IONOS\_ PASSWORD - to specify the password
4456* IONOS\_ TOKEN - if an authentication token is being used
4557
46- In this case, the client configuration must be initialized using ` NewConfigurationFromEnv ()`
58+ In this case, the client configuration must be initialized using ` fromEnv ()` :
4759
48- ``` typescript
49- client : = new sdk .ClustersApi (sdk .NewConfigurationFromEnv ())
60+ ``` javascript
61+ const client = new sdk.ClustersApi (sdk .Configuration . fromEnv ());
5062```
5163
5264{% hint style="danger" %}
You can’t perform that action at this time.
0 commit comments