Skip to content

Latest commit

 

History

History
1787 lines (1126 loc) · 45.5 KB

monetize_api.md

File metadata and controls

1787 lines (1126 loc) · 45.5 KB

Table of Contents

monetize_api

IronSource Monetize API

MonetizeAPI Objects

class MonetizeAPI()

IronSource Monetize API

set_credentials

def set_credentials(user: str, token: str, secret: str)

sets the API credentials

Arguments:

  • user (str): - user name from the platform
  • token (str): - token from the platform
  • secret (str): - secret from the platform

get_user_ad_revenue

async def get_user_ad_revenue(date: str,
                              application_key: str,
                              stream: bool = False) -> Union[str, io.BytesIO]

Get User Ad Revenue per application key

Arguments:

  • date (str): - date in 'YYYY-MM-DD' format
  • application_key (str): - the application key for which user ad revenue is being requested
  • stream (bool): - (Defaults - False) if true stream will be returned

Returns:

user ad revenue as string or byte stream

get_impression_ad_revenue

async def get_impression_ad_revenue(
        date: str,
        application_key: str,
        stream: bool = False) -> Union[str, io.BytesIO]

Impressions level Ad Revenue per application

Arguments:

  • date (str): - date in 'YYYY-MM-DD' format
  • application_key: - the application key for which user ad revenue is being requested
  • application_key: str
  • stream (bool): - (Defaults - False) if true stream will be returned

Returns:

Impression level ad revenue as string or byte stream

get_monetization_data

async def get_monetization_data(
        start_date: str,
        end_date: str,
        application_key: str = None,
        country: str = None,
        ad_units: AdUnits = None,
        ad_source: Networks = None,
        metrics: Iterable[Metrics] = None,
        breakdowns: Iterable[Breakdowns] = None) -> dict

Get monetization reporting

Arguments:

  • start_date (str): Report start date in the following format YYYY-MM-DD
  • end_date (str): Report end date in the following format YYYY-MM-DD
  • application_key (str, optional): The application key for the report
  • country (str, optional): Country code in 2 letter country code, as per [ISO 3166-1 Alpha-2] <https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes>_.
  • ad_units (AdUnits, optional): Filter for specific AdUnit (RewardedVideo, Interstitial, Banner, Offerwall)
  • ad_source (Networks, optional): Filter for specific Ad Source - network.
  • metrics (Iterable[Metrics], optional): List of metrics see supported breakdown and metrics
  • breakdowns (Iterable[Breakdowns], optional): List of breakdowns see supported breakdown and metrics

Returns:

None if there was an error fetching monetization data or dictionary with the data

get_apps

async def get_apps() -> dict

Get list of apps

Returns:

dict: dictionary of list of apps from the account

add_temporary_app

async def add_temporary_app(app_name: str,
                            platform: Platform,
                            coppa: bool,
                            ad_unit_status: AdUnitStatusMap = None,
                            ccpa: bool = None)

Adds a temporary app

Arguments:

  • app_name (str): Application's name
  • platform (Platform): Application's platform from Platform
  • coppa (bool): The COPPA settings of the application (True/False)
  • ad_unit_status (AdUnitStatusMap): Ad Unit status map see AdUnitStatusMap
  • ccpa (bool): The CCPA settings of the application (True/False)

Returns:

dict with new application key

add_app

async def add_app(app_store_url: str,
                  taxonomy: str,
                  coppa: bool,
                  ad_unit_status: AdUnitStatusMap = None,
                  ccpa: bool = None)

Adds application which is already live in the store

Arguments:

  • app_store_url (str): iOS / Android app store url for the application
  • taxonomy (str): the application sub-genre - directory of valid labels: https://developers.is.com/ironsource-mobile/air/taxonomy-2 \n
  • coppa (bool): The COPPA settings of the application (True/False)
  • ad_unit_status (AdUnitStatusMap): Ad Unit status map see AdUnitStatusMap
  • ccpa (bool): The CCPA settings of the application (True/False)

Returns:

dict with new application key

get_instances

async def get_instances(application_key: str) -> dict

Get Instances list for a given application key

Arguments:

  • application_key (str): application key to get instances for

Returns:

dict: return JSON format list of the instances

add_instances

async def add_instances(application_key: str,
                        instances: Iterable[InstanceConfig])

Adds new instances to an app

Arguments:

  • application_key (str): Application Key to add instance to.
  • instances (Iterable[InstanceConfig]): List of InstanceConfigs to be add.

Returns:

dict with all the instances of the app

delete_instance

async def delete_instance(application_key: str, instance_id: int)

Deletes instance from application

Arguments:

  • application_key (str): Application key to delete instance from
  • instance_id (int): instance id to delete

Returns:

return list of all instances belongs to the ap

update_instances

async def update_instances(application_key: str,
                           instances: Iterable[InstanceConfig])

Updates instances for an application

Arguments:

  • application_key (str): Application key to update instances for
  • instances (Iterable[InstanceConfig]): list of instances to update (instance must contain instance id)

Returns:

list of all instances

get_mediation_groups

async def get_mediation_groups(application_key: str)

returns mediation groups for an application

Arguments:

  • application_key (str): application key to fetch mediation groups

Returns:

list of mediation groups

create_mediation_group

async def create_mediation_group(
        application_key: str,
        ad_unit: AdUnits,
        group_name: str,
        group_countries: Iterable[str],
        group_position: int = None,
        group_segment: int = None,
        ad_source_priority: MediationGroupPriority = None)

Creates new mediation group for an application

Arguments:

  • application_key (str): Application key to create new mediation group for
  • ad_unit (AdUnits): Ad unit to create mediation group for (see AdUnits)
  • group_name (str): Group's name
  • group_countries (Iterable[str]): List of group countries in ISO 3166-1 Alpha-2
  • group_position (int, optional): Position of the group in the groups list, defaults to None
  • group_segment (int, optional): Segment ID attached to the group, defaults to None
  • ad_source_priority (MediationGroupPriority, optional): AdSource and their priority in the group (see MediationGroupPriority), defaults to None

Raises:

  • Exception: When API error occurs

Returns:

dict: list of groups belongs to the app in json format

update_mediation_group

async def update_mediation_group(
        application_key: str,
        group_id: int,
        group_name: str = None,
        group_countries: Iterable[str] = None,
        group_segments: int = None,
        ad_source_priority: MediationGroupPriority = None)

Updates mediation group for an app

Arguments:

  • application_key (str): Application key to update group for
  • group_id (int): Id of the group to update
  • group_name (str): (optional) - Group name
  • group_countries (Iterable[str]): (optional) - List of group countries in ISO 3166-1 Alpha-2
  • group_segments: (int, optional) Group segment to update
  • ad_source_priority: (MediationGroupPriority, optional) Ad Sources and their priority in the group (see MediationGroupPriority)

Returns:

List of group for the application after the changes

delete_mediation_group

async def delete_mediation_group(application_key: str, group_id: int)

Deletes group for an application

Arguments:

  • application_key (str): Application key to delete the group for
  • group_id (int): The group ID to delete

Returns:

List of group for the application after the changes

get_placements

async def get_placements(application_key: str) -> dict

Get list of placements

Arguments:

  • application_key (str): Application key for placements

Returns:

dict: json list of placements from the application

add_placements

async def add_placements(application_key: str,
                         placements: Iterable[Placement]) -> dict

Create new placements, include capping and pacing setup, in your application account

Arguments:

  • application_key (str): Application key of the app
  • placements (Iterable[Placement]): Array (list) of placements to be added/created

Returns:

json: placement identifier - This parameter is not shown in the ironSource platform and you can retrieve it using the get_placements method. You will need to use the id when editing/deleting placements.

delete_placements

async def delete_placements(application_key: str, ad_unit: AdUnits,
                            placement_id: int) -> str

Archive existing placements in your applications

Arguments:

  • application_key (str): Application key to delete placement from
  • ad_unit (AdUnits): Ad Unit type
  • placement_id (int): placement id to delete

Returns:

return True if successful

update_placements

async def update_placements(application_key: str,
                            placements: Iterable[Placement])

Updates placements for an application

Arguments:

  • application_key (str): Application key to update placements for
  • placements (Iterable[Placement]): list of placements to update (placement must contain placement id)

Returns:

True if successful

placement_config

Module for creating placements object

Capping Objects

class Capping()

Capping Class

Arguments:

  • limit (int): Capping limit (max 1000).
  • interval (str): Capping interval: 'd' - days or 'h' - hours
  • enabled (bool): True is enabled, False is disabled.

Raises:

  • TypeError: When wrong type was set
  • ValueError: when limit or interval values are wrong

Pacing Objects

class Pacing()

Pacing Class

Arguments:

  • minutes (float): Minimum gap in minutes between ad delivery (max 1000).
  • enabled (bool): True is enabled, False is disabled.

Raises:

  • TypeError: when enabled type is wrong.

Placement Objects

class Placement()

Placement Object

Arguments:

  • ad_unit (AdUnits): Ad Unit for placement
  • ad_delivery (bool): Ad delivery is turned on or off
  • name (str, optional): placement unique name - only required for add_placements method
  • placement_id (int, optional): Placement unique identifier - not used for add_placements method
  • item_name (str, optional): Reward name (max 30 chars) - rewardedVideo only
  • reward_amount (int, optional): Amount of items to gift for a single ad view (max 2000000000) - rewardedVideo only
  • capping (Capping, optional): Capping for placement, defaults to None
  • pacing (Pacing, optional): pacing for placement, defaults to None

Raises:

  • ValueError:
  • TypeError:

mediation_group_priority

Module for Mediation Group Tier Priority

TierType Objects

class TierType(enum.Enum)

Enum representing different tier types for mediation group

  • MANUAL

  • SORT_BY_CPM

  • OPTIMIZED

  • BIDDERS

MediationGroupTier Objects

class MediationGroupTier()

Mediation Group Tier

add_instances

def add_instances(network: Networks,
                  instance_id: int,
                  rate: int = None,
                  position: int = None,
                  capping: int = None)

Adds instance to group Tier

Arguments:

  • network: a network from Networks
  • instance_id: ID of the instance for the network (see MonetizeAPI().get_instances())
  • rate: Optional: overrides the cpm of the instance with rate
  • position: Optional: The position of the instance in the waterfall, only for Manual tier type
  • capping: Optional: Set capping for the instance per session

get_instance_list

def get_instance_list() -> list

Returns list of instances in the tier

remove_instance

def remove_instance(network: Networks, instance_id: int)

Removes instance from the tier.

Arguments:

  • network: The Network of the instance to remove.
  • instance_id: Instance ID to remove.

get_tier_type

def get_tier_type() -> TierType

Returns:

the tier type of the group

MediationGroupPriority Objects

class MediationGroupPriority()

Class representing a groups priority of tiers

set_mediation_group_tier

def set_mediation_group_tier(group_tier: MediationGroupTier,
                             position: int) -> bool

sets group tier in specific place in the group (tier1, tier2, tier3)

Arguments:

  • group_tier: MediationGroupTier to be added to the group tier list
  • position: The Position of the tier (0-2), Ignored in case of bidding tier.

Returns:

true upon successful addition of the tier to the group list.

remove_tier

def remove_tier(position: int)

Removes tier from the group

Arguments:

  • position: position of the tier to be removed (0-2)

remove_bidders

def remove_bidders()

Removes bidders from the group

get_bidders

def get_bidders()

Returns groups bidders list

get_tiers

def get_tiers() -> Iterable[any]

Returns groups tiers list

instance_config

IronSourceInstance Objects

class IronSourceInstance(IronSourceBase)

Create IronSource Instance

Arguments:

  • instance_name (str): name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • application_key (str): Application key for the instance
  • pricing (Dict[int, List[str]], optional): dictionary of price and list of countries, defaults to None
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1

IronSourceBidding Objects

class IronSourceBidding(IronSourceBase)

Create IronSource bidding instance

Arguments:

  • instance_name (str): name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • application_key (str): Application key for the instance
  • pricing (Dict[int, List[str]], optional): dictionary of price and list of countries, defaults to None
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1

AdColonyInstance Objects

class AdColonyInstance(AdColonyBase)

AdColony instance

Arguments:

  • instance_name (str): name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): AdColony App ID
  • zone_id (str): AdColony Zone ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

AdColonyBidding Objects

class AdColonyBidding(AdColonyBase)

AdColony Bidding instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): AdColony App ID
  • zone_id (str): AdColony Zone ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

AdMobInstance Objects

class AdMobInstance(InstanceConfig)

AdMob instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): AdMob App ID
  • ad_unit_id (str): AdMob AdUnit ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

AdManager Objects

class AdManager(InstanceConfig)

Ad Manager instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): AdManager App ID
  • ad_unit_id (str): AdManager Ad Unit ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

AmazonInstance Objects

class AmazonInstance(InstanceConfig)

Amazon Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_key (str): Amazon Application Key
  • ec (str): Amazon EC
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

ApplovinInstance Objects

class ApplovinInstance(InstanceConfig)

Applovin Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • sdk_key (str): Applovin SDK Key
  • zone_id (str): Applovin Zone ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

ChartboostInstance Objects

class ChartboostInstance(InstanceConfig)

Chartboost Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Charboost App ID
  • app_signature (str): Chartboost App Signature
  • ad_location (str): Charboost Ad Location
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

CrossPromotionBidding Objects

class CrossPromotionBidding(InstanceConfig)

Cross Promotion Bidding Instance"

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • traffic_id (str): Cross Promotion traffic ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

CSJInstance Objects

class CSJInstance(InstanceConfig)

CSJ Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): CSJ Application ID
  • slot_id (str): CSJ Slot ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

DirectDeals Objects

class DirectDeals(InstanceConfig)

Direct Deals Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • traffic_id (str): Direct Deal Traffic ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

FacebookInstance Objects

class FacebookInstance(FacebookBase)

Facebook Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Facebook App ID
  • user_access_token (str): Facebook User Access Token
  • placement_id (str): Facebook Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

FacebookBidding Objects

class FacebookBidding(FacebookBase)

Facebook Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Facebook Application ID
  • user_access_token (str): Facebook User Access Token
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

FyberInstance Objects

class FyberInstance(InstanceConfig)

Fyber Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Fyber Application ID
  • ad_spot_id (str): Fyber Ad Spot ID
  • content_id (str): Fyber Content ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

HyperMXInstance Objects

class HyperMXInstance(InstanceConfig)

HyperMXInstance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • placement_id (str): HyperMX Placement ID
  • distributor_id: HyperMX Distributor Id
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

InMobiInstance Objects

class InMobiInstance(InMobiBase)

InMobi Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • placement_id (str): InMobi Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

InMobiBidding Objects

class InMobiBidding(InMobiBase)

InMobi Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • placement_id (str): InMobi Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

LiftoffInstance Objects

class LiftoffInstance(InstanceConfig)

Liftoff Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): LiftOff Application ID
  • ad_unit_id (str): LiftOff Ad Unit ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

MaioInstance Objects

class MaioInstance(InstanceConfig)

Maio Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Maio App ID
  • media_id (str): Maio Media ID
  • zone_id (str): Maio ZoneID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

MediaBrixInstance Objects

class MediaBrixInstance(InstanceConfig)

MediaBrix Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): MediaBrix App ID
  • reporting_property (str): MediaBrix Reporting property
  • zone (str): MediaBrix Zone
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

MyTarget Objects

class MyTarget(InstanceConfig)

MyTarget Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • slot_id (str): MyTarget Slot ID
  • placement_id (str): MyTarget Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

TapJoyInstance Objects

class TapJoyInstance(TapJoyBase)

TapJoy Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • sdk_key (str): TapJoy SDK Key
  • api_key (str): TapJoy API Key
  • placement_name (str): TapJoy Placement Name
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

TapJoyBidding Objects

class TapJoyBidding(TapJoyBase)

TapJoy Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • sdk_key (str): TapJoy SDK Key
  • api_key (str): TapJoy API Key
  • placement_name (str): TapJoy Placement Name
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

PangleInstance Objects

class PangleInstance(PangleBase)

Pangle Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Pangle App ID
  • slot_id (str): Pangle Slot ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

PangleBidding Objects

class PangleBidding(PangleBase)

Pangle Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Pangle App ID
  • slot_id (str): Pangle Slot ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

UnityAdsInstance Objects

class UnityAdsInstance(InstanceConfig)

Unity Ads Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • source_id (str): Unity Source ID
  • zone_id (str): Unity Zone ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

SmaatoInstance Objects

class SmaatoInstance(InstanceConfig)

Smaato Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • application_name (str): Smaato Application Name
  • ad_space_id (str): Smaato Ad Space ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

SnapInstance Objects

class SnapInstance(InstanceConfig)

Snap Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Snap Application ID
  • slot_id (str): Snap Slot ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

SuperAwesomeInstance Objects

class SuperAwesomeInstance(InstanceConfig)

SuperAwesome Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): SuperAwesome Application ID
  • placement_id (str): SuperAwesome Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

TencentInstance Objects

class TencentInstance(InstanceConfig)

Tencent Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Tencent Application ID
  • placement_id (str): Tencent Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

YahooBidding Objects

class YahooBidding(InstanceConfig)

Yahoo Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Yahoo Application ID
  • site_id (str): Yahoo Site ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

VungleInstance Objects

class VungleInstance(VungleBase)

Vungle Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Vungle Application ID
  • reporting_api_id (str): Vungle Reporting API ID
  • placement_id (str): Vungle Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

VungleBidding Objects

class VungleBidding(VungleBase)

Vungle Bidding Instance

Arguments:

  • instance_name (str): Name for the instance
  • ad_unit (AdUnits): Ad Unit that the instance will be used with
  • app_id (str): Vungle Application ID
  • reporting_api_id (str): Vungle Reporting API ID
  • placement_id (str): Vungle Placement ID
  • status (bool, optional): Instance is turned on or off, defaults to True
  • instance_id (int, optional): instance id of the instance for update request, defaults to -1
  • rate (float, optional): instance rate, defaults to None

AdUnitStatusMap Objects

class AdUnitStatusMap(dict)

This class represents mapping of Ad Units to their active status example:

adunit_map = AdUnitStatusMap()
adunit_map[AdUnits.RewardedVideo] = AdUnitStatus.Live

AdUnitStatus Objects

class AdUnitStatus(enum.Enum)

Enum class represents Ad Unit Status

  • Live

  • Off

  • Test

AdUnits Objects

class AdUnits(enum.Enum)

Enum class represents Ad Unit

  • RewardedVideo

  • Interstitial

  • Banner

  • Offerwall

Platform Objects

class Platform(enum.Enum)

Enum class represents platfroms

  • iOS

  • Android

Metrics Objects

class Metrics(enum.Enum)

Enum class represents reporting metrics

  • impressions

  • revenue

  • eCPM

  • appFillRate

  • appRequests

  • completions

  • revenuePerCompletion

  • appFills

  • useRate

  • activeUsers

  • engagedUsers

  • engagedUsersRate

  • impressionsPerEngagedUser

  • revenuePerActiveUser

  • revenuePerEngagedUser

  • clicks

  • clickThroughRate

  • completionRate

  • adSourceChecks

  • adSourceResponses

  • adSourceAvailabilityRate

  • sessions

  • engagedSessions

  • impressionsPerSession

  • impressionPerEngagedSessions

  • sessionsPerActiveUser

Networks Objects

class Networks(enum.Enum)

Enum class represents networks

  • IronSource

  • IronSourceBidding

  • AppLovin

  • AdColony

  • AdColonyBidding

  • AdMob

  • AdManager

  • Amazon

  • Chartboost

  • CrossPromotionBidding

  • CSJ

  • DirectDeals

  • Facebook

  • FacebookBidding

  • Fyber

  • HyperMX

  • InMobi

  • InMobiBidding

  • LiftOff

  • Maio

  • MediaBrix

  • MyTarget

  • Pangle

  • PangleBidding

  • Smaato

  • Snap

  • SuperAwesome

  • TapJoy

  • TapJoyBidding

  • Tencent

  • UnityAds

  • Vungle

  • VungleBidding

  • YahooBidding

Breakdowns Objects

class Breakdowns(enum.Enum)

Enum class represents reporting breakdowns

  • Date

  • Application

  • Platform

  • Network

  • AdUnits

  • Instance

  • Country

  • Segment

  • Placement

  • IOSVersion

  • ConnectionType

  • SDKVersion

  • AppVersion

  • ATT

  • IDFA

  • ABTest