File tree 2 files changed +8
-17
lines changed 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change
1
+ name : Build @cryptlex/web-api-client
2
+
1
3
on :
2
4
push :
3
5
branches :
4
6
- main
5
- name : release-please
7
+
6
8
jobs :
7
9
release-please :
8
10
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -19,29 +19,18 @@ npm install @cryptlex/web-api-client
19
19
The library needs to be configured with the a valid access token. This is done in the ` CryptlexWebApiClientOptions ` instantiation.
20
20
21
21
``` ts
22
- import {
23
- CryptlexWebApiClient ,
24
- CryptlexWebApiClientOptions ,
25
- } from " @cryptlex/web-api-client" ;
22
+ import { CryptlexWebApiClient , CryptlexWebApiClientOptions } from " @cryptlex/web-api-client" ;
26
23
27
24
const ACCESS_TOKEN = " **ACCESS_TOKEN**" ;
28
25
const PRODUCT_ID = " **PRODUCT_ID**" ;
29
26
30
- const cryptlexWebApiClientOptions = new CryptlexWebApiClientOptions (
31
- ACCESS_TOKEN
32
- );
33
- const cryptlexWebApiClient = new CryptlexWebApiClient (
34
- cryptlexWebApiClientOptions
35
- );
27
+ const clientOptions = new CryptlexWebApiClientOptions (ACCESS_TOKEN );
28
+ const client = new CryptlexWebApiClient (clientOptions );
36
29
37
30
try {
38
31
// Create a license in the product defined by PRODUCT_ID
39
- const licenseResponse = await cryptlexWebApiClient .createLicense ({
40
- productId: PRODUCT_ID ,
41
- });
42
- console .log (
43
- " \n Successfully created license: " + JSON .stringify (licenseResponse .data )
44
- );
32
+ const licenseResponse = await client .createLicense ({ productId: PRODUCT_ID });
33
+ console .log (" Successfully created license: " + JSON .stringify (licenseResponse .data ));
45
34
} catch (error ) {
46
35
console .error (error );
47
36
}
You can’t perform that action at this time.
0 commit comments