Copyright (c) 2010 The Echo Nest. All rights reserved. Created by Tyler Williams on 2010-04-25.
Utility functions to support the Echo Nest web API interface.
API Specific Errors.
Parent exception class. Catches API and URL/HTTP errors.
URL and HTTP errors.
Call the api! Param_dict is a regular python dictionary so if you want to have multi-valued params put them in a list.
** note, if we require 2.6, we can get rid of this timeout munging.
Attempt to replace postMultipart() with nearly-identical interface. (The files tuple no longer requires the filename, and we only return the response body.) Uses the urllib2_file.py originally from http://fabien.seisen.org which was also drawn heavily from http://code.activestate.com/recipes/146306/ .
This urllib2_file.py is more desirable because of the chunked uploading from a file pointer (no need to read entire file into memory) and the ability to work from behind a proxy (due to its basis on urllib2).