Skip to main content

A small python module for the AdMob API

Project description

You can view all examples on using the module at: https://github.com/mlagace/python-admob

**Examples on how to use the python-admob module:**

from admob import Admob

"""
Before starting to use the API you need to generate an AdMob API Token.
"""
admob = Admob('API KEY')
token = admob.login(email='Email', password='API Password')

"""
Get and Set Token
"""
if len(token['errors']) == 0:
admob.token = token['data']['token']
else:
print token['errors']

"""
Get all sites and stats
"""
sites = admob.search('site')
if len(sites['errors']) == 0:
print sites['data']
else:
print sites['errors']

stats = admob.getstats(sites['data'][0]['id'], 'site', {'start_date':'2011-12-11','object_dimension':'site', 'time_dimension':'day', 'order_by[impressions]':'desc'})
if len(stats['errors']) == 0:
print stats['data']
else:
print stats['errors']

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for python-admob, version 1.0.0
Filename, size File type Python version Upload date Hashes
Filename, size python-admob.tar.gz (18.9 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page