Class e.p.t.r.TheTvDBResourceProvider(ResourceProvider):

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

Provide access to resources served by TheTvDB.com over HTTP.
Line # Kind Name Docs
53 Method initialize Initialize the component.
58 Method clean Close all the open HTTP connections.
71 Method get Link to API docs: http://www.thetvdb.com/wiki/index.php?title=Programmers_API
123 Method _node_value Undocumented
129 Method _set_optional_value_from_xml Undocumented
140 Method _pipe_unsplit Undocumented
143 Method _timestamp_to_datetime Undocumented
146 Method _img_path_to_url Undocumented
150 Method _year_month_day_to_date Undocumented
154 Method _fill_series_model Undocumented
202 Method _fill_episode_model Undocumented
234 Method _fill_banners Undocumented
252 Method _response_read Undocumented
301 Method _request_done Undocumented

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.

Inherited from Loggable (via ResourceProvider, Component):

Line # Kind Name Docs
81 Method __init__ Undocumented
def initialize(self):
Initialize the component.

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

Returnsa deferred called when a component is fully initialized (type: twisted.internet.defer.Deferred )
def clean(self):
Close all the open HTTP connections.
def get(self, uri, context_model=None):
Link to API docs: http://www.thetvdb.com/wiki/index.php?title=Programmers_API

This resource_provider can:

- lookup for TV shows given a search term and return results
  in the I{series} attribute of a
  L{elisa.plugins.thetvdb.models.TvSeriesListModel}

- retrieve extended informations about a TV show, given its id
  in the uri (cf online API docs) and a
  L{elisa.plugins.thetvdb.models.TvSeriesModel}
  context_model. This context_model will be completed and
  returned.

- retrieve extended informations about a sepecific episode,
  passed as I{context_model}, in a specific season of a TV
  show and return them in the updated
  L{elisa.plugins.thetvdb.models.TvEpisodeModel} instance

Posters, banners and fanart hosted on thetvdb.com can also be retrieved
and stored to L{elisa.plugins.base.models.media.RawDataModel}
instances. Images are in jpeg format.

@param uri:           URI pointing to the resource
@type uri:            L{elisa.core.media_uri.MediaUri}
@param context_model: optional series model instance to fill
@type context_model:  L{elisa.plugins.thetvdb.models.TvSeriesModel} or
                      C{None}

@return:              a new model and a deferred fired when the model
                      is filled with the requested resource's data
@rtype:               tuple of L{elisa.core.components.model.Model}
                      L{elisa.core.utils.defer.Deferred}
def _node_value(self, node, node_name):
Undocumented
def _set_optional_value_from_xml(self, model, attr_name, xml_node, node_name, trans_func=None):
Undocumented
def _pipe_unsplit(self, text):
Undocumented
def _timestamp_to_datetime(self, text):
Undocumented
def _img_path_to_url(self, text):
Undocumented
def _year_month_day_to_date(self, text):
Undocumented
def _fill_series_model(self, serie, model=None):
Undocumented
def _fill_episode_model(self, episode, model):
Undocumented
def _fill_banners(self, banners, model):
Undocumented
def _response_read(self, response, result_model):
Undocumented
def _request_done(self, response, model, url):
Undocumented
API Documentation for Elisa Media Center, generated by pydoctor at 2009-02-16 19:15:05.