Add a track to a last.fm user's playlist.
static
void
addTrack
(
string $id,
string $artist,
string $track,
Session $session)
-
string
$id: The ID of the playlist - this is available in user.getPlaylists. (Required)
-
string
$artist: The artist name that corresponds to the track to be added. (Required)
-
string
$track: The track name to add to the playlist. (Required)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Create a last.fm playlist on behalf of a user.
static
Playlist
create
([
string $title =
null], [
string $description =
null],
Session $session)
-
string
$title: Title for the playlist. (Optional)
-
string
$description: Description for the playlist. (Optional)
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Fetch XSPF playlists using a last.fm playlist url.
static
Playlist
fetch
(
string $playlist, [
string $streaming =
null], [
string $fod =
null], [
Session $session =
null])
-
string
$playlist: A lastfm protocol playlist url ('lastfm://playlist/...'). (Required)
-
string
$streaming: Weather to fetch a playlist for streaming. (Optional)
-
string
$fod: Weather to fetch a playlist with free on demand tracks. (Optional)
-
Session
$session: A session obtained by getSession or getMobileSession. (Optional)
Create a Playlist object from a SimpleXMLElement.
static
Playlist
fromSimpleXMLElement
(
$xml)
-
SimpleXMLElement
$xml: A SimpleXMLElement object.
Create a playlist object.
Playlist
__construct
(integer $id, string $title, string $annotation, string $creator, integer $date, $tracks, integer $size, boolean $streamable, array $track)
-
integer
$id: Playlist id.
-
string
$title: Playlist tile.
-
string
$annotation: Playlist annotation.
-
string
$creator: Playlist creator.
-
integer
$date: Playlist date (unix timestamp).
-
array
$track: An array of Track objects.
-
integer
$size: Playlist size.
-
boolean
$streamable: Playlist is streamable.
-
array
$tracks
Returns the annotation of this playlist.
string
getAnnotation
()
Returns the creator of this playlist.
string
getCreator
()
Returns the date of this playlist.
integer
getDate
()
Returns the ID of this playlist.
integer
getId
()
Returns the size of this playlist.
integer
getSize
()
Returns the title of this playlist.
string
getTitle
()
Returns a track of this playlist.
Track
getTrack
(
integer $index)
-
integer
$index: Track index.
Returns an array of tracks of this playlist.
array
getTracks
()
Returns if the playlist is streamable.
boolean
isStreamable
()