# Class e.p.a.r.AmazonResourceProvider(ResourceProvider):

Part of elisa.plugins.amazon.resource_provider View In Hierarchy

A resource provider that implements the GET method for use on the Amazon Web Services API (see http://aws.amazon.com/ for details).

The GET method allows to retrieve lists of items containing the results to a search query to the Amazon Web Services, or directly an image from the Amazon image server.

Line # | Kind | Name | Docs
--- | --- | --- | ---
64 | Method | initialize | Initialize the component.
70 | Method | clean | Clean the component.
77 | Method | get | GET request to the Amazon servers.

Inherited from ResourceProvider:

Line # | Kind | Name | Docs
--- | --- | --- | ---
94 | Method | post | Update the resource pointed by `uri` with `parameters`.
107 | Method | put | Put one resource into another. Both resources are identified with URIs.
129 | 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.

Inherited from Loggable (via ResourceProvider, Component):

Line # | Kind | Name | Docs
--- | --- | --- | ---
81 | Method | __init__ | Undocumented

def initialize(self):
overrides elisa.core.component.Component.initialize

Initialize the component.

This method is called by `Component.create` to finish the initialization of a component.

Returns | a deferred called when a component is fully initialized (type: `twisted.internet.defer.Deferred` )

def clean(self):
overrides elisa.core.component.Component.clean

Clean the component.

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

Returns | a deferred called when the component has finished cleaning its state (type: `twisted.internet.defer.Deferred` )

def get(self, uri, context_model=None):
overrides elisa.core.components.resource_provider.ResourceProvider.get

GET request to the Amazon servers.

It accepts the following types of URLs:

- http://ecs.amazonaws.com/onca/xml?.* : query to the Amazon Web Services API, returns a list of items (`elisa.plugins.amazon.models.AmazonItemListModel`).
- http://ecx.images-amazon.com/images/.* : query to the Amazon image server for e.g. an audio album cover, returns the image data (`elisa.plugins.base.models.media.RawDataModel`).

The contextual model is currently not used.