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

Class ReleaseFilter

source code

object --+    
         |    
   IFilter --+
             |
            ReleaseFilter

A filter for the release collection.

Instance Methods
 
__init__(self, title=None, discId=None, releaseTypes=None, artistName=None, artistId=None, limit=None, offset=None, query=None)
Constructor.
source code
 
createParameters(self)
Create a list of query parameters.
source code

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, title=None, discId=None, releaseTypes=None, artistName=None, artistId=None, limit=None, offset=None, query=None)
(Constructor)

source code 

Constructor.

If discId or artistId are set, only releases matching those IDs are returned. The releaseTypes parameter allows to limit the types of the releases returned. You can set it to (Release.TYPE_ALBUM, Release.TYPE_OFFICIAL), for example, to only get officially released albums. Note that those values are connected using the AND operator. MusicBrainz' support is currently very limited, so Release.TYPE_LIVE and Release.TYPE_COMPILATION exclude each other (see the documentation on release attributes for more information and all valid values).

If both the artistName and the artistId parameter are given, the server will ignore artistName.

The query parameter may contain a query in Lucene syntax. Note that query may not be used together with the other parameters except for limit and offset.

Parameters:
  • title - a unicode string containing the release's title
  • discId - a unicode string containing the DiscID
  • releaseTypes - a sequence of release type URIs
  • artistName - a unicode string containing the artist's name
  • artistId - a unicode string containing the artist's ID
  • limit - the maximum number of releases to return
  • offset - start results at this zero-based offset
  • query - a string containing a query in Lucene syntax
Overrides: object.__init__

See Also: the constants in musicbrainz2.model.Release

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
Overrides: IFilter.createParameters
(inherited documentation)