@adtogether/web-sdk 0.1.27 → 0.2.1
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/CHANGELOG.md +52 -48
- package/README.md +165 -165
- package/dist/{chunk-V3TR7YMJ.mjs → chunk-EGEGGY7K.mjs} +4 -1
- package/dist/index.js +4 -1
- package/dist/index.mjs +1 -1
- package/dist/react/index.js +4 -1
- package/dist/react/index.mjs +1 -1
- package/errors.txt +2 -2
- package/package.json +58 -58
- package/src/core/AdTogether.ts +4 -1
- package/src/react/AdTogetherInterstitial.tsx +370 -370
- package/tsconfig.json +19 -19
package/src/core/AdTogether.ts
CHANGED
|
@@ -5,7 +5,7 @@ export class AdTogether {
|
|
|
5
5
|
private appId?: string;
|
|
6
6
|
private bundleId?: string;
|
|
7
7
|
private allowSelfAds: boolean = true;
|
|
8
|
-
public baseUrl: string = 'https://
|
|
8
|
+
public baseUrl: string = 'https://www.ad-together.org';
|
|
9
9
|
|
|
10
10
|
private constructor() {}
|
|
11
11
|
|
|
@@ -79,6 +79,9 @@ export class AdTogether {
|
|
|
79
79
|
const ad = await response.json();
|
|
80
80
|
sdk.lastAdId = ad.id;
|
|
81
81
|
return ad;
|
|
82
|
+
} else if (response.status === 401 || response.status === 403) {
|
|
83
|
+
console.error('AdTogether Error: Invalid App ID. Please check your dashboard.');
|
|
84
|
+
throw new Error(`AdTogether Error: Invalid App ID. Status: ${response.status}`);
|
|
82
85
|
}
|
|
83
86
|
|
|
84
87
|
throw new Error(`Failed to fetch ad. Status: ${response.status}`);
|