Package musicbrainz2 :: Module model :: Class ReleaseEvent
[frames] | no frames]

Class ReleaseEvent

source code

object --+
         |
        ReleaseEvent

A release event, indicating where and when a release took place.

All country codes used must be valid ISO-3166 country codes (i.e. 'DE', 'UK' or 'FR'). The dates are strings and must have the format 'YYYY', 'YYYY-MM' or 'YYYY-MM-DD'.

The format of the release medium is a URI that can be compared to the constants on this class (FORMAT_CD, FORMAT_DVD and others).

Instance Methods
 
__init__(self, country=None, dateStr=None)
Constructor.
source code
 
getCountry(self)
Returns the country a release took place.
source code
 
setCountry(self, country)
Sets the country a release took place.
source code
 
getCatalogNumber(self)
Returns the catalog number of this release event.
source code
 
setCatalogNumber(self, catalogNumber)
Sets the catalog number of this release event.
source code
 
getBarcode(self)
Returns the barcode of this release event.
source code
 
setBarcode(self, barcode)
Sets the barcode of this release event.
source code
 
getLabel(self)
Returns a Label object for the label associated with this release.
source code
 
setLabel(self, label)
Sets the label of this release event.
source code
 
getDate(self)
Returns the date a release took place.
source code
 
setDate(self, dateStr)
Sets the date a release took place.
source code
 
getFormat(self)
Returns the format of the release medium.
source code
 
setFormat(self, format)
Sets the format of the release medium.
source code

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

Class Variables
  FORMAT_CD = 'http://musicbrainz.org/ns/mmd-1.0#CD'
  FORMAT_DVD = 'http://musicbrainz.org/ns/mmd-1.0#DVD'
  FORMAT_SACD = 'http://musicbrainz.org/ns/mmd-1.0#SACD'
  FORMAT_DUALDISC = 'http://musicbrainz.org/ns/mmd-1.0#DualDisc'
  FORMAT_LASERDISC = 'http://musicbrainz.org/ns/mmd-1.0#LaserDisc'
  FORMAT_MINIDISC = 'http://musicbrainz.org/ns/mmd-1.0#MiniDisc'
  FORMAT_VINYL = 'http://musicbrainz.org/ns/mmd-1.0#Vinyl'
  FORMAT_CASSETTE = 'http://musicbrainz.org/ns/mmd-1.0#Cassette'
  FORMAT_CARTRIDGE = 'http://musicbrainz.org/ns/mmd-1.0#Cartridge'
  FORMAT_REEL_TO_REEL = 'http://musicbrainz.org/ns/mmd-1.0#ReelT...
  FORMAT_DAT = 'http://musicbrainz.org/ns/mmd-1.0#DAT'
  FORMAT_DIGITAL = 'http://musicbrainz.org/ns/mmd-1.0#Digital'
  FORMAT_WAX_CYLINDER = 'http://musicbrainz.org/ns/mmd-1.0#WaxCy...
  FORMAT_PIANO_ROLL = 'http://musicbrainz.org/ns/mmd-1.0#PianoRoll'
  FORMAT_OTHER = 'http://musicbrainz.org/ns/mmd-1.0#Other'
Properties
  country
The country a release took place.
  catalogNumber
The catalog number of the release event
  barcode
The barcode of the release event
  label
The label of the release
  date
The date a release took place.
  format
The format of the release medium.

Inherited from object: __class__

Method Details

__init__(self, country=None, dateStr=None)
(Constructor)

source code 

Constructor.

Parameters:
  • country - a string containing an ISO-3166 country code
  • dateStr - a string containing a date string
Overrides: object.__init__

getCountry(self)

source code 

Returns the country a release took place.

Returns:
a string containing an ISO-3166 country code, or None

Note: Due to a server limitation, the web service does not return country IDs for release collection queries. This only affects the musicbrainz2.webservice.Query.getReleases query.

See Also: musicbrainz2.utils.getCountryName

setCountry(self, country)

source code 

Sets the country a release took place.

Parameters:
  • country - a string containing an ISO-3166 country code

getCatalogNumber(self)

source code 

Returns the catalog number of this release event.

Returns:
A string containing the catalog number, or None

setCatalogNumber(self, catalogNumber)

source code 

Sets the catalog number of this release event.

Parameters:
  • catalogNumber - A string containing the catalog number

getBarcode(self)

source code 

Returns the barcode of this release event.

Returns:
A string containing the barcode, or None

setBarcode(self, barcode)

source code 

Sets the barcode of this release event.

Parameters:
  • barcode - A string containing the barcode

getLabel(self)

source code 

Returns a Label object for the label associated with this release.

Returns:
a Label object, or None

setLabel(self, label)

source code 

Sets the label of this release event.

Parameters:

getDate(self)

source code 

Returns the date a release took place.

Returns:
a string containing a date

setDate(self, dateStr)

source code 

Sets the date a release took place.

Parameters:
  • dateStr - a string containing a date

getFormat(self)

source code 

Returns the format of the release medium.

Returns:
a string containing a URI, or None

setFormat(self, format)

source code 

Sets the format of the release medium.

Parameters:
  • format - a string containing a URI

Class Variable Details

FORMAT_REEL_TO_REEL

Value:
'http://musicbrainz.org/ns/mmd-1.0#ReelToReel'

FORMAT_WAX_CYLINDER

Value:
'http://musicbrainz.org/ns/mmd-1.0#WaxCylinder'

Property Details

country

The country a release took place.

Get Method:
getCountry(self) - Returns the country a release took place.
Set Method:
setCountry(self, country) - Sets the country a release took place.

catalogNumber

The catalog number of the release event

Get Method:
getCatalogNumber(self) - Returns the catalog number of this release event.
Set Method:
setCatalogNumber(self, catalogNumber) - Sets the catalog number of this release event.

barcode

The barcode of the release event

Get Method:
getBarcode(self) - Returns the barcode of this release event.
Set Method:
setBarcode(self, barcode) - Sets the barcode of this release event.

label

The label of the release

Get Method:
getLabel(self) - Returns a Label object for the label associated with this release.
Set Method:
setLabel(self, label) - Sets the label of this release event.

date

The date a release took place.

Get Method:
getDate(self) - Returns the date a release took place.
Set Method:
setDate(self, dateStr) - Sets the date a release took place.

format

The format of the release medium.

Get Method:
getFormat(self) - Returns the format of the release medium.
Set Method:
setFormat(self, format) - Sets the format of the release medium.