musixmatch.track.Track Class Reference
Inheritance diagram for musixmatch.track.Track:
Inheritance graph
Collaboration diagram for musixmatch.track.Track:
Collaboration graph

Public Member Functions

def fromMatcher (cls, keywords)
 
def get (self, key, default=_marker)
 
def __getitem__ (self, key)
 
def postFeedback (self, feedback)
 
def fromMatcher (cls, keywords)
 
def get (self, key, default=_marker)
 
def __getitem__ (self, key)
 
def postFeedback (self, feedback)
 
def fromMatcher (cls, keywords)
 
def get (self, key, default=_marker)
 
def __getitem__ (self, key)
 
def postFeedback (self, feedback)
 
def fromMatcher (cls, keywords)
 
def get (self, key, default=_marker)
 
def __getitem__ (self, key)
 
def postFeedback (self, feedback)
 
- Public Member Functions inherited from musixmatch.base.Item
def __init__ (self, dictionary=None, keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __hash__ (self)
 
def fromResponseMessage (cls, message)
 
def fromDictionary (cls, dictionary, keywords)
 
def __init__ (self, dictionary=None, keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __hash__ (self)
 
def fromResponseMessage (cls, message)
 
def fromDictionary (cls, dictionary, keywords)
 
def __init__ (self, dictionary=None, keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __hash__ (self)
 
def fromResponseMessage (cls, message)
 
def fromDictionary (cls, dictionary, keywords)
 
def __init__ (self, dictionary=None, keywords)
 
def __str__ (self)
 
def __repr__ (self)
 
def __hash__ (self)
 
def fromResponseMessage (cls, message)
 
def fromDictionary (cls, dictionary, keywords)
 
- Public Member Functions inherited from musixmatch.base.Base
def label (cls)
 
def apiMethod (cls)
 
def __str__ (self)
 
def __repr__ (self)
 
def label (cls)
 
def apiMethod (cls)
 
def __str__ (self)
 
def __repr__ (self)
 
def label (cls)
 
def apiMethod (cls)
 
def __str__ (self)
 
def __repr__ (self)
 
def label (cls)
 
def apiMethod (cls)
 
def __str__ (self)
 
def __repr__ (self)
 

Static Private Attributes

 __api_method__ = track.get
 

Detailed Description

This class builds a :py:class:`dict` like object representing a track. It
can get track information through the :py:class:`musixmatch.api.Method`
**track.get** or from an already well-formed :py:class:`dict`. Create a
Track object based on a given keyword argument:

:param track_id: musiXmatch track ID
:param musicbrainz_id: Musicbrainz track ID
:param track_echonest_id: Echonest track ID
:param track_data: an already well-formed :py:class:`dict` of track data
:raises: :py:exc:`musixmatch.api.Error` if :py:class:`musixmatch.api.ResponseStatusCode` is not 200

Once information are collected, the following keys are available:

:keyword track_id: musiXmatch track ID
:keyword track_mbid: Musicbrainz track ID
:keyword lyrics_id: musiXmatch lyrics ID
:keyword instrumental: wether the track is instrumental or not
:keyword subtitle_id: musiXmatch subtitle ID
:keyword track_name: track name
:keyword album_coverart_100x100: album cover URL
:keyword artist_id: musiXmatch artist ID
:keyword artist_mbid: Musicbrainz artist ID
:keyword artist_name: artist name

Keyword access have been overloaded thanks to the :py:meth:`get` method
which will eventually fetch the matching lyrics or subtitle.

Definition at line 24 of file musixmatch-master/build/lib/musixmatch/track.py.

Member Function Documentation

def musixmatch.track.Track.__getitem__ (   self,
  key 
)
def musixmatch.track.Track.__getitem__ (   self,
  key 
)
def musixmatch.track.Track.__getitem__ (   self,
  key 
)

Definition at line 86 of file musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.__getitem__ (   self,
  key 
)

Definition at line 86 of file Yading/musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.fromMatcher (   cls,
  keywords 
)
Returns a :py:class:`Track` based on the result of the
:py:class:`musiXmatch.api.Method` **matcher.track.get**. Accepts the
following keywords:

:param q_track: words to be searched among track titles
:param q_artist: words to be searched among artist names

Definition at line 56 of file Yading/musixmatch-master/build/lib/musixmatch/track.py.

def musixmatch.track.Track.fromMatcher (   cls,
  keywords 
)
Returns a :py:class:`Track` based on the result of the
:py:class:`musiXmatch.api.Method` **matcher.track.get**. Accepts the
following keywords:

:param q_track: words to be searched among track titles
:param q_artist: words to be searched among artist names

Definition at line 56 of file musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.fromMatcher (   cls,
  keywords 
)
Returns a :py:class:`Track` based on the result of the
:py:class:`musiXmatch.api.Method` **matcher.track.get**. Accepts the
following keywords:

:param q_track: words to be searched among track titles
:param q_artist: words to be searched among artist names

Definition at line 56 of file Yading/musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.fromMatcher (   cls,
  keywords 
)
Returns a :py:class:`Track` based on the result of the
:py:class:`musiXmatch.api.Method` **matcher.track.get**. Accepts the
following keywords:

:param q_track: words to be searched among track titles
:param q_artist: words to be searched among artist names

Definition at line 56 of file musixmatch-master/build/lib/musixmatch/track.py.

Referenced by musixmatch.track.Track.fromMatcher().

def musixmatch.track.Track.get (   self,
  key,
  default = _marker 
)
If key is *lyrics* or *subtitle* try to query api for proper value,
and build an :py:class:`musixmatch.lyrics.Lyrics` or
:py:class:`musixmatch.subtitle.Subtitle`. Access to the above mentioned
keys may fail with :py:exc:`musixmatch.api.Error`. Once fetched, the
result is saved.

Definition at line 67 of file musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.get (   self,
  key,
  default = _marker 
)
If key is *lyrics* or *subtitle* try to query api for proper value,
and build an :py:class:`musixmatch.lyrics.Lyrics` or
:py:class:`musixmatch.subtitle.Subtitle`. Access to the above mentioned
keys may fail with :py:exc:`musixmatch.api.Error`. Once fetched, the
result is saved.

Definition at line 67 of file Yading/musixmatch-master/build/lib/musixmatch/track.py.

def musixmatch.track.Track.get (   self,
  key,
  default = _marker 
)
If key is *lyrics* or *subtitle* try to query api for proper value,
and build an :py:class:`musixmatch.lyrics.Lyrics` or
:py:class:`musixmatch.subtitle.Subtitle`. Access to the above mentioned
keys may fail with :py:exc:`musixmatch.api.Error`. Once fetched, the
result is saved.

Definition at line 67 of file musixmatch-master/build/lib/musixmatch/track.py.

Referenced by musixmatch.track.Track.__getitem__(), and musixmatch.track.Track.get().

def musixmatch.track.Track.get (   self,
  key,
  default = _marker 
)
If key is *lyrics* or *subtitle* try to query api for proper value,
and build an :py:class:`musixmatch.lyrics.Lyrics` or
:py:class:`musixmatch.subtitle.Subtitle`. Access to the above mentioned
keys may fail with :py:exc:`musixmatch.api.Error`. Once fetched, the
result is saved.

Definition at line 67 of file Yading/musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.postFeedback (   self,
  feedback 
)
Post feedback about lyrics for this track. **feedback** can be one of:

:keyword wrong_attribution: the lyrics shown are not by the artist that
                    I selected.
:keyword bad_characters:    there are strange characters and/or words
                    that are partially scrambled.
:keyword lines_too_long:    the text for each verse is too long!
:keyword wrong_verses:      there are some verses missing from the
                    beginning or at the end.
:keyword wrong_formatting:  the text looks horrible, please fix it!

Definition at line 89 of file musixmatch-master/build/lib/musixmatch/track.py.

Referenced by musixmatch.track.Track.postFeedback().

def musixmatch.track.Track.postFeedback (   self,
  feedback 
)
Post feedback about lyrics for this track. **feedback** can be one of:

:keyword wrong_attribution: the lyrics shown are not by the artist that
                    I selected.
:keyword bad_characters:    there are strange characters and/or words
                    that are partially scrambled.
:keyword lines_too_long:    the text for each verse is too long!
:keyword wrong_verses:      there are some verses missing from the
                    beginning or at the end.
:keyword wrong_formatting:  the text looks horrible, please fix it!

Definition at line 89 of file Yading/musixmatch-master/musixmatch/track.py.

def musixmatch.track.Track.postFeedback (   self,
  feedback 
)
Post feedback about lyrics for this track. **feedback** can be one of:

:keyword wrong_attribution: the lyrics shown are not by the artist that
                    I selected.
:keyword bad_characters:    there are strange characters and/or words
                    that are partially scrambled.
:keyword lines_too_long:    the text for each verse is too long!
:keyword wrong_verses:      there are some verses missing from the
                    beginning or at the end.
:keyword wrong_formatting:  the text looks horrible, please fix it!

Definition at line 89 of file Yading/musixmatch-master/build/lib/musixmatch/track.py.

def musixmatch.track.Track.postFeedback (   self,
  feedback 
)
Post feedback about lyrics for this track. **feedback** can be one of:

:keyword wrong_attribution: the lyrics shown are not by the artist that
                    I selected.
:keyword bad_characters:    there are strange characters and/or words
                    that are partially scrambled.
:keyword lines_too_long:    the text for each verse is too long!
:keyword wrong_verses:      there are some verses missing from the
                    beginning or at the end.
:keyword wrong_formatting:  the text looks horrible, please fix it!

Definition at line 89 of file musixmatch-master/musixmatch/track.py.

Field Documentation

musixmatch.track.Track.__api_method__ = track.get
staticprivate

The documentation for this class was generated from the following file: