@leadping/sdk 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +13 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Leadping TypeScript SDK
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Type-safe TypeScript client for the Leadping API.
|
|
4
4
|
|
|
5
5
|
## Install
|
|
6
6
|
|
|
@@ -8,13 +8,13 @@ Typed TypeScript client for the Leadping API, generated from `leadpingai/openapi
|
|
|
8
8
|
npm install @leadping/sdk
|
|
9
9
|
```
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
The generated client uses a Kiota request adapter. Install the default fetch adapter:
|
|
12
12
|
|
|
13
13
|
```bash
|
|
14
14
|
npm install @microsoft/kiota-http-fetchlibrary
|
|
15
15
|
```
|
|
16
16
|
|
|
17
|
-
|
|
17
|
+
GitHub Packages is also available:
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
20
|
npm config set @leadpingai:registry https://npm.pkg.github.com
|
|
@@ -27,17 +27,19 @@ npm install @leadpingai/sdk
|
|
|
27
27
|
import { createLeadpingOpenApiClient } from "@leadping/sdk";
|
|
28
28
|
|
|
29
29
|
const adapter = createLeadpingRequestAdapter();
|
|
30
|
-
adapter.baseUrl = "https://api.leadping.ai";
|
|
31
|
-
|
|
32
30
|
const client = createLeadpingOpenApiClient(adapter);
|
|
31
|
+
|
|
33
32
|
const me = await client.users.me.get();
|
|
34
33
|
```
|
|
35
34
|
|
|
36
|
-
`createLeadpingRequestAdapter`
|
|
35
|
+
`createLeadpingRequestAdapter` is application code. Configure it to send one of:
|
|
36
|
+
|
|
37
|
+
- `Authorization: Bearer <token>`
|
|
38
|
+
- `X-Leadping-Api-Key: <key>`
|
|
39
|
+
|
|
40
|
+
The client defaults to `https://api.leadping.ai` when the adapter does not already have a base URL.
|
|
37
41
|
|
|
38
|
-
##
|
|
42
|
+
## Links
|
|
39
43
|
|
|
40
|
-
-
|
|
41
|
-
-
|
|
42
|
-
- GitHub Packages name: `@leadpingai/sdk`
|
|
43
|
-
- License: see `LICENSE`
|
|
44
|
+
- [API reference](https://leadping.ai/docs/api-reference)
|
|
45
|
+
- [License](LICENSE)
|
package/package.json
CHANGED