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

Class User

source code

object --+
         |
        User

Represents a MusicBrainz user.

Instance Methods
 
__init__(self)
Constructor.
source code
 
getName(self)
Returns the user name.
source code
 
setName(self, name)
Sets the user name.
source code
 
getTypes(self)
Returns the types of this user.
source code
 
addType(self, type_)
Add a type to the list of types.
source code
 
getShowNag(self)
Returns true if a nag screen should be displayed to the user.
source code
 
setShowNag(self, value)
Sets the value of the nag screen flag.
source code

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

Properties
  name
The MusicBrainz user name.
  types
The user's types.
  showNag
The value of the nag screen flag.

Inherited from object: __class__

Method Details

__init__(self)
(Constructor)

source code 
Constructor.
Overrides: object.__init__

getName(self)

source code 
Returns the user name.
Returns:
a string containing the user name

setName(self, name)

source code 
Sets the user name.
Parameters:
  • name - a string containing the user name

getTypes(self)

source code 

Returns the types of this user.

Most users' type list is empty. Currently, the following types are defined:
  • 'http://musicbrainz.org/ns/ext-1.0#AutoEditor'
  • 'http://musicbrainz.org/ns/ext-1.0#RelationshipEditor'
  • 'http://musicbrainz.org/ns/ext-1.0#Bot'
  • 'http://musicbrainz.org/ns/ext-1.0#NotNaggable'
Returns:
a list of strings containing absolute URIs

addType(self, type_)

source code 
Add a type to the list of types.
Parameters:
  • type_ - a string containing absolute URIs

See Also: getTypes

getShowNag(self)

source code 
Returns true if a nag screen should be displayed to the user.
Returns:
True, False, or None

setShowNag(self, value)

source code 

Sets the value of the nag screen flag.

If set to True,
Parameters:
  • value - True or False

See Also: getShowNag


Property Details

name

The MusicBrainz user name.
Get Method:
musicbrainz2.model.User.getName(self) - Returns the user name.
Set Method:
musicbrainz2.model.User.setName(self, name) - Sets the user name.

types

The user's types.
Get Method:
musicbrainz2.model.User.getTypes(self) - Returns the types of this user.

showNag

The value of the nag screen flag.
Get Method:
musicbrainz2.model.User.getShowNag(self) - Returns true if a nag screen should be displayed to the user.
Set Method:
musicbrainz2.model.User.setShowNag(self, value) - Sets the value of the nag screen flag.