Skip to content

mtrdesign/dizzyapi-py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 

Repository files navigation

dizzyapi-py

This library provides a Python client for the DizzyJam.com API. The catalogue/ group of calls is public, and can be used without authentication; all other calls require valid AuthID and API Key. Information on obtaining these credentials can be found in the API Docs.

This library supports both JSON and XML as API outputs.

Installation

Simply drop the dizzyapi package where Python can find it. There are no external dependencies. Requires Python 2.6+.

Usage

Instantiate a connection object and call its methods:

from dizzyapi import JSONAPIConn, XMLAPIConn, APIError

# Unauthenticated JSON connection
# API results are returned as Python dictionaries
json_conn = JSONAPIConn()
store_info = json_conn.dj_catalogue_store_info ('dizzyjam')

# Authenticated JSON - requires valid AuthID and APIKey
json_conn = JSONAPIConn(AuthID, APIKey)
my_stores = json_conn.dj_manage_my_stores() # Result would still be a dict

# Method names stay the same between JSON and XML connections
# API results are returned as ElementTrees (xml.etree.ElementTree)
xml_conn = XMLAPIConn()
store_info = xml_conn.dj_catalogue_store_info ('dizzyjam')

More info

The full list of calls supported by the API, along with their arguments and sample output can be found at http://www.dizzyjam.com/apidoc/. To get the corresponding library method name, simply prefix the call name with 'dj_' and replace '/' with '_' (e.g. catalogue/store_info -> dj_catalogue_store_info())

About

Python client for the Dizzyam.com API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages