Protocol objects

class adselect.iface.protocol.BannerObject[source]

Bases: jsonobject.jsonobject.api.JsonObject

BannerObject
Object Properties:
 
  • banner_id (string) – Unique banner identifier
  • campaign_id (string) – Unique campaign identifier
  • keywords (JSONObject) – Key-value map of keywords
  • banner_size (string) – Banner size, eg. 100x400
JSON Example
{
    "keywords": "{JSONObject object}", 
    "banner_id": "gRYFYtYeOFWAOVrtlhnX", 
    "campaign_id": "BXfmBKBdsQdDOdNbCtxd", 
    "banner_size": "100x400"
}
banner_id

Main banner identifier (String).

banner_size

Banner size, in pixels, width x height (String).

campaign_id

Campaign identifier (String).

keywords

Keywords (Dictionary of Strings).

class adselect.iface.protocol.CampaignObject[source]

Bases: jsonobject.jsonobject.api.JsonObject

CampaignObject
Object Properties:
 
  • campaign_id (string) – Unique campaign identifier
  • time_start (integer) – Campaign start time (epoch time, in seconds)
  • time_end (integer) – Campaign end time (epoch time, in seconds)
  • keywords (JSONObject) – Key-value map of keywords
  • filters (RequireExcludeObject) – Filters for campaign
  • banners ([BannerObject]) – List of banner objects
JSON Example
{
    "time_start": "1543326642", 
    "campaign_id": "BXfmBKBdsQdDOdNbCtxd", 
    "time_end": "1643326642", 
    "filters": "{RequireExcludeObject object}", 
    "keywords": "{JSONObject object}", 
    "banners": [
        "{BannerObject object}", 
        "{BannerObject object}"
    ]
}
banners

List of banners (List of BannerObject)

campaign_id

Main campaign identifier (String).

filters

Required and Excluded keywords (RequireExcludeObject)

keywords

Keywords (Dictionary of Strings).

time_end

End epoch time (Integer).

time_start

Start epoch time (Integer).

class adselect.iface.protocol.ImpressionObject[source]

Bases: jsonobject.jsonobject.api.JsonObject

ImpressionObject
Object Properties:
 
  • banner_id (string) – Main banner identifier (String)
  • publisher_id (string) – Publisher identifier (String)
  • user_id (string) – User identifier (String)
  • paid_amount (float) – Payment for the impression (Float)
  • keywords (JSONObject) – Keywords associated with the impression
JSON Example
{
    "keywords": "{JSONObject object}", 
    "publisher_id": "buXFBGAzBleFluYsolGs", 
    "banner_id": "dotgHEDTTtaqIMHBxFMV", 
    "user_id": "zbRmcNCtFVhTVvoijJgR", 
    "paid_amount": 9149145323.9
}
banner_id

Main banner identifier (String)

event_id

Main event identifier (String)

keywords

Keywords (Dictionary of Strings)

paid_amount

Payment for the impression (Float)

publisher_id

Publisher identifier (String)

user_id

User identifier (String)

class adselect.iface.protocol.RequireExcludeObject[source]

Bases: jsonobject.jsonobject.api.JsonObject

RequireExcludeListObject

Require and exclude attributes are dictionary/JSON Object, where each key is a list/JSON Array of values. The values are all strings, but they can define a range, by adding a special delimiter (default: ‘–’).

Examples of valid key-value pairs:

  • “age”: [“18–30”]
  • “interest”: [“cars”]
  • “movies”: [“action”, “horror”, “thriller”]
Object Properties:
 
  • require (DictProperty) – Dictionary of required keywords
  • exclude (DictProperty) – Dictionary of excluded keywords
JSON Example
{
    "exclude": "{DictProperty object}", 
    "require": "{DictProperty object}"
}
exclude

Dictionary of excluded keywords

require

Dictionary of required keywords

class adselect.iface.protocol.SelectBannerRequest[source]

Bases: jsonobject.jsonobject.api.JsonObject

SelectBannerRequest
Object Properties:
 
  • request_id (integer) – Request id
  • publisher_id (string) – Publisher id
  • user_id (string) – User identifier (String)
  • banner_size (string) – Banner size, eg. 100x400
  • keywords (JSONObject) – Keywords associated with the impression
  • banner_filters (RequireExcludeListObject) – RequireExcludeListObject
JSON Example
{
    "user_id": "PeBIbIhxopyEGLRfOrHs", 
    "banner_size": "100x400", 
    "banner_filters": "{RequireExcludeListObject object}", 
    "request_id": 2640, 
    "keywords": "{JSONObject object}", 
    "publisher_id": "DTOzzbXYDkLCQNQoXFca"
}
banner_filters

Banner filters (RequireExcludeListObject)

banner_size

Banner size, in pixels, width x height (String).

keywords

Keywords (Dictionary of Strings)

publisher_id

Publisher identifier (String)

request_id

Request identifier (Integer)

user_id

User identifier (String)

class adselect.iface.protocol.SelectBannerResponse[source]

Bases: jsonobject.jsonobject.api.JsonObject

SelectBannerResponse
Object Properties:
 
  • banner_id (string) – Unique banner identifier
  • request_id (integer) – Request identifier
JSON Example
{
    "banner_id": "xkEerpxoKCPUbrngOXHD", 
    "request_id": 6013
}
banner_id

Main banner identifier (String)

request_id

Request identifier (Integer)