Class c.e.c.CoverGetter(object):

Part of coherence.extern.covers_by_amazon View Source View In Hierarchy

retrieve a cover image for a given ASIN,
                           a TITLE or
                           an ARTIST/TITLE combo

parameters are:

    filename: where to save a received image
              if NONE the image will be passed to the callback
    callback: a method to call with the filename
              or the image as a parameter
              after the image request and save was successful
              can be:
              - only a callable
              - a tuple with a callable,
                  - optional an argument or a tuple of arguments
                  - optional a dict with keyword arguments
    not_found_callback: a method to call when the search at Amazon failed
              can be:
              - only a callable
              - a tuple with a callable,
                  - optional an argument or a tuple of arguments
                  - optional a dict with keyword arguments
    locale:   which Amazon Webservice Server to use, defaults to .com
    image_size: request the cover as large|medium|small image
                resolution seems to be in pixels for
                large: 500x500, medium: 160x160 and small: 75x75
    asin: the Amazon Store Identification Number
    artist: the artists name
    title: the album title

if the filename extension and the received image extension differ,
the image is converted with PIL to the desired format
http://www.pythonware.com/products/pil/index.htm
Line # Kind Name Docs
148 Method __init__ Undocumented
189 Method send_request Undocumented
196 Method got_image Undocumented
240 Method got_response Undocumented
288 Method got_error Undocumented
def __init__(self, filename, aws_key, callback=None, not_found_callback=None, locale=None, image_size='large', title=None, artist=None, asin=None): (source)
Undocumented
def send_request(self, url, *args, **kwargs): (source)
Undocumented
def got_image(self, result, convert_from='', convert_to=''): (source)
Undocumented
def got_response(self, result): (source)
Undocumented
def got_error(self, failure, url): (source)
Undocumented
API Documentation for Coherence, generated by pydoctor at 2007-12-08 21:02:38.