Tag an album using a list of user supplied tags.
static
void
addTags
(
string $artist,
string $track,
$tags,
Session $session)
-
string
$artist: The artist name in question. (Required)
-
string
$track: The track name in question. (Required)
-
array
$tags: A comma delimited list of user supplied tags to apply to this track. Accepts a maximum of 10 tags. (Required)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Ban a track for a given user profile. This needs to be supplemented with a scrobbling submission containing the 'ban' rating (see the audioscrobbler API).
static
void
ban
(
string $artist,
string $track,
Session $session)
-
string
$artist: An artist name. (Required)
-
string
$track: A track name. (Required)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Create a Track object from a SimpleXMLElement.
static
Track
fromSimpleXMLElement
(
$xml)
-
SimpleXMLElement
$xml: A SimpleXMLElement.
Get the metadata for a track on last.fm using the artist/track name or a MusicBrainz id.
static
array
getInfo
(string $artist, string $track, [string $mbid = null])
-
string
$artist: The artist name in question. (Optional)
-
string
$track: The track name in question. (Optional)
-
string
$mbid: The MusicBrainz ID for the track. (Optional)
Get a track playlist for streaming. INOFFICIAL.
static
mixed
getPlaylist
(string $artist, string $track)
-
string
$artist: An artist name. (Required)
-
string
$track: A track name. (Required)
Get the similar tracks for this track on last.fm, based on listening data.
static
array
getSimilar
(string $artist, string $track, [string $mbid = null])
-
string
$artist: The artist name in question. (Optional)
-
string
$track: The track name in question. (Optional)
-
string
$mbid: The MusicBrainz ID for the track. (Optional)
Get the tags applied by an individual user to a track on last.fm.
static
array
getTags
(
string $artist,
string $track,
Session $session)
-
string
$artist: The artist name in question. (Required)
-
string
$track: The track name in question. (Required)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Get the top fans for this track on last.fm, based on listening data. Supply either track & artist name or MusicBrainz id.
static
array
getTopFans
(string $artist, string $track, [string $mbid = null])
-
string
$artist: The artist name in question. (Optional)
-
string
$track: The track name in question. (Optional)
-
string
$mbid: The MusicBrainz ID for the track. (Optional)
Get the top tags for this track on last.fm, ordered by tag count. Supply either track & artist name or mbid.
static
array
getTopTags
(string $artist, string $track, [string $mbid = null])
-
string
$artist: The artist name in question. (Optional)
-
string
$track: The track name in question. (Optional)
-
string
$mbid: The MusicBrainz ID for the track. (Optional)
Love a track for a user profile. This needs to be supplemented with a scrobbling submission containing the 'love' rating (see the audioscrobbler API).
static
void
love
(
string $artist,
string $track,
Session $session)
-
string
$artist: An artist name. (Required)
-
string
$track: A track name. (Required)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Remove a user's tag from a track.
static
void
removeTag
(
string $artist,
string $track,
string $tag,
Session $session)
-
string
$artist: The artist name in question. (Required)
-
string
$track: The track name in question. (Required)
-
string
$tag: A single user tag to remove from this track. (Required)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Search for a track by track name. Returns track matches sorted by relevance.
static
PaginatedResult
search
(
string $track, [
string $artist =
null], [
integer $limit =
null], [
integer $page =
null])
-
string
$track: The track name in question. (Required)
-
string
$artist: Narrow your search by specifying an artist. (Optional)
-
integer
$limit: Limit the number of tracks returned at one time. Default (maximum) is 30. (Optional)
-
integer
$page: Scan into the results by specifying a page number. Defaults to first page. (Optional)
Share a track twith one or more last.fm users or other friends.
static
void
share
(
string $artist,
string $track,
$recipients, [
string $message =
null],
Session $session)
-
string
$artist: An artist name. (Required)
-
string
$track: A track name. (Required)
-
array
$recipients: A comma delimited list of email addresses or last.fm usernames. Maximum is 10. (Required)
-
string
$message: An optional message to send with the recommendation. If not supplied a default message will be used. (Optional)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Create an album object.
Track
__construct
(mixed $artist, mixed $album, string $name, string $mbid, string $url, $images, integer $listeners, integer $playCount, integer $duration, $topTags, integer $id, string $location, boolean $streamable, boolean $fullTrack, string $wiki, integer $lastPlayed)
-
mixed
$artist: An artist object or string.
-
mixed
$album: An album object or string.
-
string
$name: Name of this track.
-
string
$mbid: MusicBrainz ID of this track.
-
string
$url: Last.fm URL of this track.
-
array
$images: An array of cover art images of different sizes.
-
integer
$listeners: Number of listeners of this track.
-
integer
$playCount: Play count of this album.
-
integer
$duration: Duration of this track.
-
array
$topTags: An array of top tags of this track.
-
integer
$id: ID of this track.
-
string
$location: Location of this track.
-
boolean
$streamable: Track is streamable.
-
boolean
$fullTrack: Track is a full streamable track.
-
string
$wiki: Wiki data of this track.
-
integer
$lastPlayed: When this track was last played.
Redefinition of:
- Media::__construct()
- Create a media object.
Returns the album of this track.
mixed
getAlbum
()
Returns the artist of this track.
mixed
getArtist
()
Returns the duration of this track.
integer
getDuration
()
Returns the ID of this track.
integer
getId
()
Returns the unix timestamp indication when this track was last played.
integer
getLastPlayed
()
Returns the location of this track.
string
getLocation
()
Returns the tracks top tags.
array
getTrackTopTags
()
Returns the wiki data of this track.
string
getWiki
()
Returns if this track is a full streamable track.
boolean
isFullTrack
()
Returns if this track is streamable.
boolean
isStreamable
()
Inherited Methods
Inherited From Media
Media::__construct()
Media::getImage()
Media::getListeners()
Media::getMbid()
Media::getName()
Media::getPlayCount()
Media::getUrl()