Package musicbrainz2 :: Module webservice :: Class IWebService
[frames | no frames]

Type IWebService

object --+
         |
        IWebService

Known Subclasses:
WebService

An interface all concrete web service classes have to implement.

All web service classes have to implement this and follow the method specifications.
Method Summary
  get(self, entity, id_, include, filter, version)
Query the web service.
  post(self, entity, id_, data, version)
Submit data to the web service.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Method Details

get(self, entity, id_, include, filter, version)

Query the web service.

Using this method, you can either get a resource by id (using the id_ parameter, or perform a query on all resources of a type.

The filter and the id_ parameter exclude each other. If you are using a filter, you may not set id_ and vice versa.

Returns a file-like object containing the result or raises a WebServiceError or one of its subclasses in case of an error. Which one is used depends on the implementing class.
Parameters:
entity - a string containing the entity's name
id_ - a string containing a UUID, or the empty string
include - a tuple containing values for the 'inc' parameter
filter - parameters, depending on the entity
version - a string containing the web service version to use
Returns:
a file-like object
Raises:
WebServiceError - in case of errors

post(self, entity, id_, data, version)

Submit data to the web service.
Parameters:
entity - a string containing the entity's name
id_ - a string containing a UUID, or the empty string
data - A string containing the data to post
version - a string containing the web service version to use
Returns:
a file-like object
Raises:
WebServiceError - in case of errors

Generated by Epydoc 2.1 on Wed Dec 20 18:19:28 2006 http://epydoc.sf.net