UNPKG

react-native-google-mobile-ads

Version:

React Native Google Mobile Ads is an easy way to monetize mobile apps with targeted, in-app advertising.

46 lines 1.77 kB
import { NativeAdEventType } from '../../NativeAdEventType'; import { NativeAdImage, NativeMediaContent } from '../../specs/modules/NativeGoogleMobileAdsNativeModule'; import { NativeAdRequestOptions } from '../../types'; /** * A class for loading Native Ads. */ export declare class NativeAd { readonly adUnitId: string; readonly responseId: string; readonly advertiser: string | null; readonly body: string; readonly callToAction: string; readonly headline: string; readonly price: string | null; readonly store: string | null; readonly starRating: number | null; readonly icon: NativeAdImage | null; readonly images: Array<NativeAdImage> | null; readonly mediaContent: NativeMediaContent | null; readonly extras: Record<string, unknown> | null; private nativeEventSubscription; private eventEmitter; private constructor(); private onNativeAdEvent; addAdEventListener(type: NativeAdEventType, listener: () => void): import("react-native").EmitterSubscription; removeAllAdEventListeners(): void; destroy(): void; /** * Creates a new NativeAd instance. * * #### Example * * ```js * import { NativeAd, AdEventType, TestIds } from 'react-native-google-mobile-ads'; * * const nativeAd = await NativeAd.createForAdRequest(TestIds.NATIVE, { * requestAgent: 'CoolAds', * }); * ``` * * @param adUnitId The Ad Unit ID for the Native Ad. You can find this on your Google Mobile Ads dashboard. * @param requestOptions Optional RequestOptions used to load the ad. */ static createForAdRequest(adUnitId: string, requestOptions?: NativeAdRequestOptions): Promise<NativeAd>; } //# sourceMappingURL=NativeAd.d.ts.map