Protocol objects¶
-
class
adpay.iface.proto.BannerObject[source]¶ Bases:
jsonobject.api.JsonObject
JSON ExampleObject Properties: { "keywords": "{JSONObject object}", "banner_id": "LbyFrJNDuPryTgKGRroT", "banner_size": "100x400" }
Main banner identifier (String).
Banner size, in pixels, width x height (String).
-
keywords¶ Keywords (Dictionary of Strings).
-
class
adpay.iface.proto.CampaignObject[source]¶ Bases:
jsonobject.api.JsonObject-
CampaignObject¶
JSON ExampleObject Properties: - advertiser_id (string) – Unique advertiser identifier
- banners ([BannerObject]) – List of banner objects
- budget (float) – Hourly budget
- campaign_id (string) – Unique campaign identifier
- filters (RequireExcludeObject) – Filters for campaign
- keywords (JSONObject) – Key-value map of keywords
- max_cpc (float) – Max cost per click
- max_cpm (float) – Max cost per view
- time_end (integer) – Campaign end time (epoch time, in seconds)
- time_start (integer) – Campaign start time (epoch time, in seconds)
{ "time_start": "1543326642", "budget": 0.75, "campaign_id": "BXfmBKBdsQdDOdNbCtxd", "advertiser_id": "QdDOdNbCtxdAXfmBKBds", "max_cpc": 0.01, "filters": "{RequireExcludeObject object}", "keywords": "{JSONObject object}", "banners": [ "{BannerObject object}", "{BannerObject object}" ], "time_end": "1643326642", "max_cpm": 0.005 }
-
-
class
adpay.iface.proto.EventObject[source]¶ Bases:
jsonobject.api.JsonObject-
EventObject¶
JSON ExampleObject Properties: - banner_id (string) – Unique banner identifier
- case_id (string) – Unique case identifier for a set of events
- event_id (string) – Unique event identifier
- event_type (string) – Event type: click, view or conversion
- event_value (float) – Custom value for event
- human_score (float) – Human score (0.0 for bot to 1.0 for human)
- our_keywords (JSONObject) – Key-value map of keywords
- publisher_id (string) – Unique publisher identifier
- timestamp (integer) – Event time (epoch time, in seconds)
- their_keywords (JSONObject) – Key-value map of keywords
{ "banner_id": "itrbhkrktqobTVXWmLgg", "human_score": 1.0, "event_type": "fkOYkDpMBKnRcNbHjuhQ", "event_id": "oqawGQVnpilYigHbVVtG", "timestamp": "1543326642", "their_keywords": "{JSONObject object}", "our_keywords": "{JSONObject object}", "case_id": "UeHZbLEUCGwAzbXNANfQ", "publisher_id": "eEhetSALAOWUvRLKbxOT", "event_value": 0.5 }
-
-
class
adpay.iface.proto.PaymentsRequest[source]¶ Bases:
jsonobject.api.JsonObject-
PaymentsRequest¶
JSON ExampleObject Properties: - timestamp (integer) – Timestamp in epoch seconds
{ "timestamp": "1544454407" }
-
timestamp¶ Timestamp of payment request
-
-
class
adpay.iface.proto.PaymentsResponse[source]¶ Bases:
jsonobject.api.JsonObject-
PaymentsResponse¶
JSON ExampleObject Properties: - payments ([SinglePaymentResponse]) – List of payments for individual events
{ "payments": [ "{SinglePaymentResponse object}", "{SinglePaymentResponse object}" ] }
-
payments¶ List of payments for individual events
-
-
class
adpay.iface.proto.RequireExcludeObject[source]¶ Bases:
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”]
JSON ExampleObject Properties: - exclude (DictProperty) – Dictionary of excluded keywords
- require (DictProperty) – Dictionary of required keywords
{ "exclude": "{DictProperty object}", "require": "{DictProperty object}" }
-
exclude¶ Dictionary of excluded keywords
-
require¶ Dictionary of required keywords
-
-
class
adpay.iface.proto.SinglePaymentResponse[source]¶ Bases:
jsonobject.api.JsonObject-
SinglePaymentResponse¶
JSON ExampleObject Properties: { "event_id": "xjaPEpNRhUwedUVljEYd", "amount": 0.15498, "reason": "0" }
-
amount¶ Amount to be paid for that event
-
event_id¶ Event identifier
-
reason¶ Payment rejection reason
-