Skip to main content

A small python module for the AdMob API

None None

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

None None

Download files

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

Source Distribution

python-admob.tar.gz (18.9 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page