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

Class IFilter

source code

object --+
         |
        IFilter
Known Subclasses:

A filter for collections.

This is the interface all filters have to implement. Filter classes are initialized with a set of criteria and are then applied to collections of items. The criteria are usually strings or integer values, depending on the filter.

Note that all strings passed to filters should be unicode strings (python type unicode). Standard strings are converted to unicode internally, but have a limitation: Only 7 Bit pure ASCII characters may be used, otherwise a UnicodeDecodeError is raised.

Instance Methods
 
createParameters(self)
Create a list of query parameters.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__

Method Details

createParameters(self)

source code 

Create a list of query parameters.

This method creates a list of (parameter, value) tuples, based on the contents of the implementing subclass. parameter is a string containing a parameter name and value an arbitrary string. No escaping of those strings is required.

Returns:
a sequence of (key, value) pairs