@mediarithmics/plugins-nodejs-sdk
Version:
This is the mediarithmics nodejs to help plugin developers bootstrapping their plugin without having to deal with most of the plugin boilerplate
20 lines (19 loc) • 1.21 kB
TypeScript
import { DisplayAd } from '../../../api/core/creative/index';
import { PluginProperty } from '../../../api/core/plugin/PluginPropertyInterface';
import { BasePlugin, PropertiesWrapper } from '../../common/BasePlugin';
import { AdRendererPluginResponse, AdRendererRequest, ClickUrlInfo } from './AdRendererInterface';
export declare class AdRendererBaseInstanceContext {
properties: PropertiesWrapper;
displayAd: DisplayAd;
}
export declare abstract class AdRendererBasePlugin<T extends AdRendererBaseInstanceContext> extends BasePlugin<T> {
displayContextHeader: string;
constructor(enableThrottling?: boolean);
fetchDisplayAd(displayAdId: string, forceReload?: boolean): Promise<DisplayAd>;
fetchDisplayAdProperties(displayAdId: string, forceReload?: boolean): Promise<PluginProperty[]>;
getEncodedClickUrl(redirectUrls: ClickUrlInfo[]): string;
protected instanceContextBuilder(creativeId: string, forceReload?: boolean): Promise<T>;
protected abstract onAdContents(request: AdRendererRequest, instanceContext: T): Promise<AdRendererPluginResponse>;
protected getInstanceContext(creativeId: string, forceReload: boolean): Promise<T>;
private initAdContentsRoute;
}