Skip to content

Commit 485a554

Browse files
authored
ci: set script name (#14)
* fix: ignore tsconfig in npm * docs: `README`, functions.md * docs: mark JSDoc internal and private * docs(README): absolute link for functions.md * ci: add script name * docs(README): formatting * ci(name): set line-break * ci(name): remove duplicate * docs(README): format imports
1 parent f770760 commit 485a554

File tree

2 files changed

+8
-17
lines changed

2 files changed

+8
-17
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
name: Build @cryptlex/web-api-client
2+
13
on:
24
push:
35
branches:
46
- main
5-
name: release-please
7+
68
jobs:
79
release-please:
810
runs-on: ubuntu-latest

README.md

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -19,29 +19,18 @@ npm install @cryptlex/web-api-client
1919
The library needs to be configured with the a valid access token. This is done in the `CryptlexWebApiClientOptions` instantiation.
2020

2121
```ts
22-
import {
23-
CryptlexWebApiClient,
24-
CryptlexWebApiClientOptions,
25-
} from "@cryptlex/web-api-client";
22+
import { CryptlexWebApiClient, CryptlexWebApiClientOptions } from "@cryptlex/web-api-client";
2623

2724
const ACCESS_TOKEN = "**ACCESS_TOKEN**";
2825
const PRODUCT_ID = "**PRODUCT_ID**";
2926

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);
3629

3730
try {
3831
// 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-
"\nSuccessfully 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));
4534
} catch (error) {
4635
console.error(error);
4736
}

0 commit comments

Comments
 (0)