Package musicbrainz2 :: Module webservice :: Class TrackFilter

[frames] | no frames]

# Class TrackFilter

source code

    object --+
             |
       IFilter --+
                 |
                TrackFilter

A filter for the track collection.

Instance Methods

__init__(self, title=None, artistName=None, artistId=None, releaseTitle=None, releaseId=None, duration=None, puid=None, limit=None, offset=None, query=None) Constructor. | source code

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

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

Properties
Inherited from `object`: `__class__`

Method Details

### __init__(self, title=None, artistName=None, artistId=None, releaseTitle=None, releaseId=None, duration=None, puid=None, limit=None, offset=None, query=None)
(Constructor)

source code

Constructor.

If `artistId`, `releaseId` or `puid` are set, only tracks matching those IDs are returned.

The server will ignore `artistName` and `releaseTitle` if `artistId` or ${releaseId} are set respectively.

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 track's title
  - `artistName` - a unicode string containing the artist's name
  - `artistId` - a string containing the artist's ID
  - `releaseTitle` - a unicode string containing the release's title
  - `releaseId` - a string containing the release's title
  - `duration` - the track's length in milliseconds
  - `puid` - a string containing a PUID
  - `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__

### 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)