libmusicbrainz3  3.0.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
MusicBrainz::ReleaseFilter Class Reference

A filter for the release collection. More...

Inheritance diagram for MusicBrainz::ReleaseFilter:
MusicBrainz::IFilter

Public Member Functions

ReleaseFiltertitle (const std::string &value)
ReleaseFilterdiscId (const std::string &value)
ReleaseFilterreleaseType (const std::string &value)
ReleaseFilterartistName (const std::string &value)
ReleaseFilterartistId (const std::string &value)
ReleaseFilterlimit (const int value)
ParameterList createParameters () const
 Create a map of query parameters.
- Public Member Functions inherited from MusicBrainz::IFilter
virtual ~IFilter ()

Additional Inherited Members

- Public Types inherited from MusicBrainz::IFilter
typedef std::vector< std::pair
< std::string, std::string > > 
ParameterList

Detailed Description

A filter for the release collection.

If discId or artistId are set, only releases matching those IDs are returned. The releaseType parameter allows to limit the types of the releases returned. You can set it to Release::TYPE_ALBUM and 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.

Note
The original Python library has releaseTypes parameter that accepts a list of release types. Due to C++ limitations, the library has releaseType parameter instead, that accepts only one release type, but you can use it multiple times. For example, to convert Python code:
ReleaseFilter(releaseTypes=(Release.TYPE_ALBUM, Release.TYPE_OFFICIAL))
you can use following C++ code:
ReleaseFilter().releaseType(Release::TYPE_ALBUM).releaseType(Release::TYPE_OFFICIAL)

Member Function Documentation

ReleaseFilter& MusicBrainz::ReleaseFilter::artistId ( const std::string &  value)
ReleaseFilter& MusicBrainz::ReleaseFilter::artistName ( const std::string &  value)
ParameterList MusicBrainz::ReleaseFilter::createParameters ( ) const
virtual

Create a map of query parameters.

Returns
: a string->string map of parameters

Implements MusicBrainz::IFilter.

ReleaseFilter& MusicBrainz::ReleaseFilter::discId ( const std::string &  value)
ReleaseFilter& MusicBrainz::ReleaseFilter::limit ( const int  value)
ReleaseFilter& MusicBrainz::ReleaseFilter::releaseType ( const std::string &  value)
ReleaseFilter& MusicBrainz::ReleaseFilter::title ( const std::string &  value)