OverwolfApi
Electron APIs / app / OverwolfApi
The Overwolf APIs, exposed on Electron's app object as app.overwolf.
Properties
| Property | Modifier | Type | Description |
|---|---|---|---|
muid | readonly | string | A unique identifier for the user machine. |
packages | public | OverwolfPackageManager | The Overwolf Package Manager instance |
phasePercent | readonly | number | Client persistence phasing percent |
uid | readonly | string | The ow-electron uid (Overwolf App Id). |
utmParams | readonly | any | Overwolf installer provided UTM params |
Methods
disableAdsFPD()
disableAdsFPD(): void;
Opt out from using first party data (email address) for ad targeting
Returns
void
disableAdsOptimization()
disableAdsOptimization(): void;
Disable Ads optimization
Returns
void
disableAnonymousAnalytics()
disableAnonymousAnalytics(): void;
Disable sending any anonymous analytics, this should be called before app.ready
Returns
void
generateUserEmailHashes()
generateUserEmailHashes(email: string): EmailHashes;
Generate a hashed email, to allow for better ad performance, this should be called after app.ready NOTE: the email is not stored! only the hashed email.
Parameters
| Parameter | Type |
|---|---|
email | string |
Returns
isCMPRequired()
isCMPRequired(): Promise<boolean>;
Returns true if the current user should be able to update their cmp configurations (i.e. openCMPWindow).
Note that this is an async function and should be called with await. The function will never throw an exception - the default value is true.
Returns
Promise<boolean>
openAdPrivacySettingsWindow()
openAdPrivacySettingsWindow(options?: CMPWindowOptions): Promise<void>;
Opens the Ads settings configuration window.
Parameters
| Parameter | Type |
|---|---|
options? | CMPWindowOptions |
Returns
Promise<void>
openCMPWindow()
openCMPWindow(options?: CMPWindowOptions): Promise<void>;
Opens the CMP configuration window - should only be called when isCMPRequired returns true.
Parameters
| Parameter | Type |
|---|---|
options? | CMPWindowOptions |
Returns
Promise<void>
setExternalPaymentUserId()
setExternalPaymentUserId(options: ExternalPaymentUserIdOptions): Promise<void>;
Associates the current user's id at an external payment provider (e.g. Tebex) with this machine. Call this once on every app launch, after app.ready. Rejects if userId is missing. providerName defaults to 'tebex'. Rejects with 'ow-electron is not ready yet!' if called before app.ready. A failed analytics report does not reject.
Parameters
| Parameter | Type |
|---|---|
options | ExternalPaymentUserIdOptions |
Returns
Promise<void>
setUserEmailHashes()
setUserEmailHashes(emailHashes?: EmailHashes): void;
Set the user email hashes (see generateUserEmailHashes), this should be called after app.ready See https://www.chromium.org/developers/design-documents/accessibility for more details how to normalize email before creating hash
Parameters
| Parameter | Type |
|---|---|
emailHashes? | EmailHashes |
Returns
void