Create a User object from a SimpleXMLElement.
static
User
fromSimpleXMLElement
(
$xml)
-
SimpleXMLElement
$xml: A SimpleXMLElement.
Get a list of upcoming events that this user is attending. Easily integratable into calendars, using the iCal standard.
static
array
getEvents
(string $user)
-
string
$user: The user to fetch the events for. (Required)
Get a list of the user's friends on last.fm.
static
array
getFriends
(string $user, [boolean $recentTracks = null], [integer $limit = null])
-
string
$user: The last.fm username to fetch the friends of. (Required)
-
boolean
$recentTracks: Whether or not to include information about friends' recent listening in the response. (Optional)
-
integer
$limit: An integer used to limit the number of friends returned. (Optional)
Get information about a user profile.
-
Session
$session: A session obtained by getSession or getMobileSession. (Required)
Get the last 50 tracks loved by a user.
static
array
getLovedTracks
(string $user)
-
string
$user: The user name to fetch the loved tracks for. (Required)
Get a list of a user's neighbours on last.fm.
static
array
getNeighbours
(string $user, [integer $limit = null])
-
string
$user: The last.fm username to fetch the neighbours of. (Required)
-
integer
$limit: An integer used to limit the number of neighbours returned. (Optional)
Get a paginated list of all events a user has attended in the past.
static
PaginatedResult
getPastEvents
(
string $user, [
integer $limit =
null], [
integer $page =
null])
-
string
$user: The username to fetch the events for. (Required)
-
integer
$limit: The number of events to return per page. (Optional)
-
integer
$page: The page number to scan to. (Optional)
Get a list of a user's playlists on last.fm.
static
array
getPlaylists
(string $user)
-
string
$user: The last.fm username to fetch the playlists of. (Required)
Get a list of the recent tracks listened to by this user. Indicates now playing track if the user is currently listening.
static
array
getRecentTracks
(string $user, [integer $limit = null])
-
string
$user: The last.fm username to fetch the recent tracks of. (Required)
-
integer
$limit: An integer used to limit the number of tracks returned. (Optional)
Get Last.fm artist recommendations for a user.
static
PaginatedResult
getRecommendedArtists
([
integer $limit =
null], [
integer $page =
null],
$session)
-
integer
$limit: The number of events to return per page. (Optional)
-
integer
$page: The page number to scan to. (Optional)
-
$session
Get a paginated list of all events recommended to a user by last.fm, based on their listening profile.
static
PaginatedResult
getRecommendedEvents
([
integer $limit =
null], [
integer $page =
null],
$session)
-
integer
$limit: The number of events to return per page. (Optional)
-
integer
$page: The page number to scan to. (Optional)
-
$session
Get shouts for this user.
static
array
getShouts
(string $user)
-
string
$user: The username to fetch shouts for. (Required)
Get the top albums listened to by a user. You can stipulate a time period. Sends the overall chart by default.
static
array
getTopAlbums
(string $user, [integer $period = null])
-
string
$user: The user name to fetch top albums for. (Required)
-
integer
$period: The time period over which to retrieve top albums for. (Optional)
Get the top artists listened to by a user. You can stipulate a time period. Sends the overall chart by default.
static
array
getTopArtists
(string $user, [integer $period = null])
-
string
$user: The user name to fetch top artists for. (Required)
-
integer
$period: The time period over which to retrieve top artists for. (Optional)
Get the top tags used by this user.
static
array
getTopTags
(string $user, [integer $limit = null])
-
string
$user: The user name to fetch top tags for. (Required)
-
integer
$limit: Limit the number of tags returned. (Optional)
Get the top tracks listened to by a user. You can stipulate a time period. Sends the overall chart by default.
static
array
getTopTracks
(string $user, [integer $period = null])
-
string
$user: The user name to fetch top tracks for. (Required)
-
integer
$period: The time period over which to retrieve top tracks for. (Optional)
Get an album chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent album chart for this user.
static
array
getWeeklyAlbumChart
(string $user, [string $from = null], [string $to = null])
-
string
$user: The last.fm username to fetch the charts of. (Required)
-
string
$from: The date at which the chart should start from. See getWeeklyChartList for more. (Optional)
-
string
$to: The date at which the chart should end on. See getWeeklyChartList for more. (Optional)
Get an artist chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent artist chart for this user.
static
array
getWeeklyArtistChart
(string $user, [string $from = null], [string $to = null])
-
string
$user: The last.fm username to fetch the charts of. (Required)
-
string
$from: The date at which the chart should start from. See getWeeklyChartList for more. (Optional)
-
string
$to: The date at which the chart should end on. See getWeeklyChartList for more. (Optional)
Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services.
static
array
getWeeklyChartList
(string $user, [ $from = null], [ $to = null])
-
string
$user: The last.fm username to fetch the charts list for. (Required)
-
$from
-
$to
Get a track chart for a user profile, for a given date range. If no date range is supplied, it will return the most recent track chart for this user.
static
array
getWeeklyTrackChart
(string $user, [string $from = null], [string $to = null])
-
string
$user: The last.fm username to fetch the charts of. (Required)
-
string
$from: The date at which the chart should start from. See getWeeklyChartList for more. (Optional)
-
string
$to: The date at which the chart should end on. See getWeeklyChartList for more. (Optional)
Create an Artist object.
User
__construct
(
string $name,
string $url,
string $language,
string $country,
integer $age,
string $gender,
boolean $subscriber,
integer $playCount,
string $playlists,
$images,
Track $lastTrack,
float $match,
integer $weight)
-
string
$name: Username.
-
string
$url: Last.fm URL of this user.
-
string
$language: Language of this user.
-
string
$country: Country of this user.
-
integer
$age: Age of this user.
-
string
$gender: Gender of this user.
-
boolean
$subscriber: Subscriber status of this user.
-
integer
$playCount: Track play count of this user.
-
string
$playlists: Number of playlist of this user.
-
array
$images: An array of cover art images of different sizes.
-
Track
$lastTrack: Last track the user played.
-
float
$match: Similarity value.
-
integer
$weight: Still no idea.
Redefinition of:
- Media::__construct()
- Create a media object.
Returns the users age.
integer
getAge
()
Returns the users country.
string
getCountry
()
Returns the users gender.
string
getGender
()
Returns the users language.
string
getLanguage
()
Returns the last played track of this user.
Returns the similarity match of this user.
float
getMatch
()
Returns the number of playlists of this user.
integer
getPlaylistCount
()
Returns whatever.
integer
getWeight
()
Returns if the user is a subscriber.
boolean
isSubscriber
()
Inherited Methods
Inherited From Media
Media::__construct()
Media::getImage()
Media::getListeners()
Media::getMbid()
Media::getName()
Media::getPlayCount()
Media::getUrl()