Class e.p.d.d.DiscogsResource(ResourceProvider):

Part of elisa.plugins.discogs.discogs_resource View In Hierarchy

No class docstring
Line # Kind Name Docs
48 Method __init__ Undocumented
52 Method get Return a resource that uri is pointing to. A URI can point to
82 Method clean Clean the component.
98 Method unzip Unzip the data from the response to be further processed in parse.
109 Method parse Parse xml data into model.

Inherited from ResourceProvider:

Line # Kind Name Docs
103 Method post Update the resource pointed by uri with parameters.
116 Method put Put one resource into another. Both resources are identified with URIs.
138 Method delete Delete a Resource represented by a URI.

Inherited from Component (via ResourceProvider):

Line # Kind Name Docs
85 Class PathDescriptor Undocumented
97 Class Method create Create and initialize the component.
130 Method initialize Initialize the component.
def __init__(self):
Undocumented
def get(self, uri, model):
Return a resource that uri is pointing to. A URI can point to any kind of resource. Resources are returned as models.

The model that is returned does not always already contain all the resource. The deferred is fired when the resource loading is complete.

ParametersuriURI pointing to the resource (type: elisa.core.media_uri.MediaUri )
context_modelthe URI often comes from a certain context. For example a URI pointing to a MusicAlbum can come from a Model that could contain the album cover or the album name. If the context_model is provided the resource_provider should try to reuse its data if possible. (type: elisa.core.components.model.Model )
Returnsa new model and a deferred fired when the model is fully loaded (type: tuple of elisa.core.components.model.Model elisa.core.utils.defer.Deferred )
def clean(self):
Clean the component.

This method is called when a component is not needed anymore to clean its state.

Returnsa deferred called when the component has finished cleaning its state (type: twisted.internet.defer.Deferred )
def unzip(self, data):
Unzip the data from the response to be further processed in parse.
Parametersdatagzip compressed data from response (type: str )
Returnsdecompressed data (type: str )
def parse(self, data, model):
Parse xml data into model. At the moment only the artist name and the artist pictures, with thumbnails, are used from the xml data. The parsed data is then stored in a ArtistModel which holds a list of elisa.plugins.base.models.image.ImageModels.
Parametersdataplain xml data from response (type: str )
modelthe ArtistModel that gets filled (type: elisa.plugins.base.models.audio.ArtistModel )
Returnsa filled ArtistModel (type: elisa.plugins.base.models.audio.ArtistModel )
API Documentation for Elisa Media Center, generated by pydoctor at 2009-02-16 19:15:05.