Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ddanier/django-openx
Provides the necessary utilities to access the new OpenX-API
https://github.com/ddanier/django-openx
Last synced: about 2 months ago
JSON representation
Provides the necessary utilities to access the new OpenX-API
- Host: GitHub
- URL: https://github.com/ddanier/django-openx
- Owner: ddanier
- Created: 2015-03-13T08:13:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-03-13T12:39:50.000Z (almost 10 years ago)
- Last Synced: 2023-03-28T23:57:47.205Z (almost 2 years ago)
- Language: Python
- Homepage:
- Size: 156 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
You need to add the following setting to django:
OPENX_URL = 'http://www.your-openx-server.tld/www/api/v1/xmlrpc/'
OPENX_USERNAME = 'username'
OPENX_PASSWORD = 'password'From Google code:
OpenX will feature a new API to manage publishers, zones, advertisers, ... via XML-RPC (https://developer.openx.org/wiki/display/DOCS/OpenX+API+Tutorial). This django application will provide a simple layer to wrap the calls to OpenX inside objects.
Currently there is no real validation of the data, but simple requests are useable (create objects, link banners to zones, ...).
Outdated Example (code reformatted to fit your screen):
{{{
>>> from django_openx import Zone
>>> z = Zone.get(2)
>>> z.generate_tag()
'\n\n[...]'
>>> z.publisher
{
'publisherName': 'Some Publisher',
'contactName': '',
'agencyId': 1,
'emailAddress': '[email protected]',
'publisherId': 2,
'accountId': 6
}
>>> p = z.publisher
>>> p.zones
[
{
'width': 468,
'zoneName': 'Some Zone',
'type': 0,
'zoneId': 2,
'publisherId': 2,
'height': 60
},
{
'width': 250,
'zoneName': 'Another Zone',
'type': 0,
'zoneId': 1,
'publisherId': 2,
'height': 250
}
]
}}}Things still missing (contributions welcome):
* Documentation (for now, just put django_openx into sys.path and read the source)
* Better support for OpenX statistics
* Support for getting banners via XML-RPC (XML-RPC ad delivery)
* Validation of data in objects or wrapping of XML-RPC exceptions to make working with API easier
* unittests
LICENSE: MIT