@rehers/rehers-roleplay-sdk 2.4.1 → 2.4.2
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 +20 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -11,18 +11,36 @@ The SDK must be initialized with the currently logged-in Seamless user before ei
|
|
|
11
11
|
|
|
12
12
|
## Load the SDK
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
Seamless can load the SDK in any of these three ways.
|
|
15
|
+
|
|
16
|
+
### Option 1: Downloaded SDK file
|
|
17
|
+
|
|
18
|
+
If Seamless is hosting the SDK file directly inside the dashboard:
|
|
15
19
|
|
|
16
20
|
```html
|
|
17
21
|
<script src="/path/to/roleplay-sdk.js"></script>
|
|
18
22
|
```
|
|
19
23
|
|
|
20
|
-
|
|
24
|
+
### Option 2: npm package
|
|
25
|
+
|
|
26
|
+
If Seamless is bundling the SDK through the frontend codebase:
|
|
21
27
|
|
|
22
28
|
```bash
|
|
23
29
|
npm install @rehers/rehers-roleplay-sdk
|
|
24
30
|
```
|
|
25
31
|
|
|
32
|
+
```js
|
|
33
|
+
import SeamlessRoleplay from "@rehers/rehers-roleplay-sdk";
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Option 3: CDN script
|
|
37
|
+
|
|
38
|
+
If Seamless wants to load the SDK without bundling it:
|
|
39
|
+
|
|
40
|
+
```html
|
|
41
|
+
<script src="https://unpkg.com/@rehers/rehers-roleplay-sdk"></script>
|
|
42
|
+
```
|
|
43
|
+
|
|
26
44
|
## Get the logged-in Seamless user
|
|
27
45
|
|
|
28
46
|
Use the existing Seamless dashboard session and call:
|