@rtsdk/topia 0.0.25 → 0.0.26
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/dist/index.cjs +41036 -0
- package/dist/index.js +4 -3
- package/dist/src/controllers/Topia.js +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -40879,10 +40879,11 @@ _WorldActivity_visitorsMap = new WeakMap();
|
|
|
40879
40879
|
* ```
|
|
40880
40880
|
*/
|
|
40881
40881
|
class Topia {
|
|
40882
|
-
constructor({ apiKey,
|
|
40882
|
+
constructor({ apiDomain, apiKey, apiProtocol, interactiveKey, interactiveSecret, }) {
|
|
40883
40883
|
getBrowserWarning();
|
|
40884
|
-
this.apiKey = apiKey;
|
|
40885
40884
|
this.apiDomain = apiDomain || "api.topia.io";
|
|
40885
|
+
this.apiKey = apiKey;
|
|
40886
|
+
this.apiProtocol = apiProtocol || "https";
|
|
40886
40887
|
this.interactiveSecret = interactiveSecret;
|
|
40887
40888
|
const headers = {
|
|
40888
40889
|
"ApplicationId": "sdk-js-topia",
|
|
@@ -40893,7 +40894,7 @@ class Topia {
|
|
|
40893
40894
|
if (interactiveKey)
|
|
40894
40895
|
headers.PublicKey = interactiveKey;
|
|
40895
40896
|
this.axios = axios.create({
|
|
40896
|
-
baseURL:
|
|
40897
|
+
baseURL: `${apiProtocol}://${this.apiDomain}/api/v1`,
|
|
40897
40898
|
headers,
|
|
40898
40899
|
});
|
|
40899
40900
|
}
|
|
@@ -16,10 +16,11 @@ import { getBrowserWarning } from "utils";
|
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
18
|
export class Topia {
|
|
19
|
-
constructor({ apiKey,
|
|
19
|
+
constructor({ apiDomain, apiKey, apiProtocol, interactiveKey, interactiveSecret, }) {
|
|
20
20
|
getBrowserWarning();
|
|
21
|
-
this.apiKey = apiKey;
|
|
22
21
|
this.apiDomain = apiDomain || "api.topia.io";
|
|
22
|
+
this.apiKey = apiKey;
|
|
23
|
+
this.apiProtocol = apiProtocol || "https";
|
|
23
24
|
this.interactiveSecret = interactiveSecret;
|
|
24
25
|
const headers = {
|
|
25
26
|
"ApplicationId": "sdk-js-topia",
|
|
@@ -30,7 +31,7 @@ export class Topia {
|
|
|
30
31
|
if (interactiveKey)
|
|
31
32
|
headers.PublicKey = interactiveKey;
|
|
32
33
|
this.axios = axios.create({
|
|
33
|
-
baseURL:
|
|
34
|
+
baseURL: `${apiProtocol}://${this.apiDomain}/api/v1`,
|
|
34
35
|
headers,
|
|
35
36
|
});
|
|
36
37
|
}
|
package/package.json
CHANGED