Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

25 lines (21 sloc) 0.845 kB
#!/usr/bin/env python
"""
django-eve-proxy (example.py) - Example Python API Usage
Copy this file to the root of your Django project's directory and un-comment
the desired example below to see a live example of direct API access.
"""
import os
# Set up the Django environment
os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from eve_proxy.models import CachedDocument
if __name__ == "__main__":
# Query with no parameters.
#cached_doc = CachedDocument.objects.api_query('/eve/ErrorList.xml.aspx', None)
# A query with parameters.
"""
cached_doc = CachedDocument.objects.api_query('/account/Characters.xml.aspx',
{'apiKey': 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
'userID': 'xxxxxxx'})
"""
# Print the results from EVE API as a string.
print cached_doc.body
Jump to Line
Something went wrong with that request. Please try again.