admob
index
python-admob-1.0.0

 
Modules
       
cjson
urllib
urllib2

 
Classes
       
Admob

 
class Admob
    To use the AdMob API you must enable API read only access to your account on the AdMob Account Information page.
Once API access is granted, you will be given an AdMob API password. This is the password you'll use to login with the client.
You must generate an AdMob client_key that you will use to access the AdMob API. This can be done on the AdMob API Beta page.
 
  Methods defined here:
__init__(self, client_key, api_url='https://api.admob.com/v2/')
getstats(self, stat_type_id, stat_type, stat_data={})
Get stats for ads, campaigns, and sites.
stat_type_id is the "id" field you received in the search results.
stat_type options: ad, site, campaign
stat_data contains optional parameters you can send to the AdMob API to filter stats.
You can view these optional params at: http://developer.admob.com/wiki/API on any Stats link.
If no start_date or end_date is given, they will be set to the current date.
login(self, endpoint='auth/login', **login_params)
You need to specify your email and AdMob API password in the login_params, to be able to login on the AdMob API.
You will receive a response containing the token data you'll need to use the AdMob API after you're logged in.
logout(self, endpoint='auth/logout')
You must logout when you are done using the AdMob API. This method hits the logout method with your client_key
and token you generated during login to destroy current token.
search(self, search_type, include_deleted=False)
Search for all ads, campaigns, and sites. The search_type parameter determines what you are searching for.
search_type options: ad, site, campaign
The include_deleted parameter determines if you want to include deleted ads, sites, or campaigns.