getAd_2l(self,
country,
targetUserId=None,
textAd=False,
userAgent=' none ' ,
keywordList=None,
protectionPolicy=1)
| source code
|
Get ads without user authorization (2-legged oAuth)
- Parameters:
country - (string): User's country in standard abbreviation, e.g.
"UK"
targetUserId - (string): Unique id to avoid users to be presented with the same
Ad several times. Default: None,
textAd - (string): If true requestes text ads, else image ads;
efault is False
userAgent - (string): Allows BlueVia advertising service to return the
more appropiate size. Default: 'none' (and not python None)
keywordList - (array): Get an ad related to some topics (e.g.
'computer|laptop'). Default: None,
protectionPolicy - (int): 1: Low, moderately explicit content 2:Safe, not rated
content 3:High, explicit content. Default: 1
- Returns:
- (tuple): (HTTP status, (dict) advertisingData).
HTTP status == "201" for success.
|