@use_socials/sdk 0.1.0
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 +46 -0
- package/dist/api.d.ts +762 -0
- package/dist/api.js +1274 -0
- package/dist/base.d.ts +42 -0
- package/dist/base.js +46 -0
- package/dist/client.d.ts +196 -0
- package/dist/client.js +275 -0
- package/dist/common.d.ts +34 -0
- package/dist/common.js +139 -0
- package/dist/configuration.d.ts +98 -0
- package/dist/configuration.js +44 -0
- package/dist/esm/api.d.ts +762 -0
- package/dist/esm/api.js +1243 -0
- package/dist/esm/base.d.ts +42 -0
- package/dist/esm/base.js +41 -0
- package/dist/esm/client.d.ts +196 -0
- package/dist/esm/client.js +270 -0
- package/dist/esm/common.d.ts +34 -0
- package/dist/esm/common.js +126 -0
- package/dist/esm/configuration.d.ts +98 -0
- package/dist/esm/configuration.js +40 -0
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +3 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +19 -0
- package/package.json +46 -0
package/README.md
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# @use_socials/sdk
|
|
2
|
+
|
|
3
|
+
This package is in active development and is not yet valid for production use.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @use_socials/sdk@0.1.0
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Quick Start
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
import { UseSocialsClient } from "@use_socials/sdk";
|
|
15
|
+
|
|
16
|
+
const client = new UseSocialsClient({
|
|
17
|
+
apiKey: process.env.USE_SOCIALS_API_KEY!,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const user = await client.users.create({
|
|
21
|
+
externalId: "user_123",
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
const connectUrl = await client.oauth.getUrl({
|
|
25
|
+
platform: "youtube",
|
|
26
|
+
userId: user.userId,
|
|
27
|
+
redirectUrl: "https://your-app.com/oauth/callback",
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
console.log(connectUrl);
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
## Configuration
|
|
34
|
+
|
|
35
|
+
```ts
|
|
36
|
+
const client = new UseSocialsClient({
|
|
37
|
+
apiKey: process.env.USE_SOCIALS_API_KEY!,
|
|
38
|
+
});
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
Options:
|
|
42
|
+
|
|
43
|
+
- `apiKey`: required org API key sent as `x-api-key`
|
|
44
|
+
- `baseUrl`: optional API base URL
|
|
45
|
+
- `baseOptions`: optional Axios request config
|
|
46
|
+
- `axios`: optional custom Axios instance
|