Class: LastFM::User
- Inherits:
-
Object
- Object
- LastFM::User
- Defined in:
- lib/lastfm/user.rb
Class Method Summary collapse
-
.get_artist_tracks(params) ⇒ Object
Get a list of tracks by a given artist scrobbled by this user, including scrobble time.
-
.get_banned_tracks(params) ⇒ Object
Get a list of tracks banned by a user.
-
.get_events(params) ⇒ Object
Get a list of upcoming events that this user is attending.
-
.get_friends(params) ⇒ Object
Get a list of the user’s friends on Last.fm.
-
.get_info(params) ⇒ Object
Get information about a user profile.
-
.get_loved_tracks(params) ⇒ Object
Get a list of tracks loved by a user.
-
.get_neighbors(params) ⇒ Object
Get a list of a user’s neighbours on Last.fm.
-
.get_new_releases(params) ⇒ Object
Gets a list of upcoming releases based on a user’s musical taste.
-
.get_past_events(params) ⇒ Object
Get a list of all events a user has attended in the past.
-
.get_personal_tags(params) ⇒ Object
Get the user’s personal tags.
-
.get_playlists(params) ⇒ Object
Get a list of a user’s playlists.
-
.get_recent_stations(params) ⇒ Object
Get a list of the recent Stations listened to by a user.
-
.get_recent_tracks(params) ⇒ Object
Get a list of the recent tracks listened to by a user.
-
.get_recommended_artists(params) ⇒ Object
Get Last.fm artist recommendations for a user.
-
.get_recommended_events(params) ⇒ Object
Get a paginated list of all events recommended to a user by Last.fm, based on their listening profile.
-
.get_shouts(params) ⇒ Object
Get shouts for a user.
-
.get_top_albums(params) ⇒ Object
Get the top albums listened to by a user, based on an optional time period.
-
.get_top_artists(params) ⇒ Object
Get the top artists listened to by a user, based on an optional time period.
-
.get_top_tags(params) ⇒ Object
Get the top tags used by a user.
-
.get_top_tracks(params) ⇒ Object
Get the top tracks listened to by a user, based on an optional time period.
-
.get_weekly_album_chart(params) ⇒ Object
Get an album chart for a user, for a given date range.
-
.get_weekly_artist_chart(params) ⇒ Object
Get an artist chart for a user, for a given date range.
-
.get_weekly_chart_list(params) ⇒ Object
Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services.
-
.get_weekly_track_chart(params) ⇒ Object
Get a track chart for a user, for a given date range.
-
.shout(params) ⇒ Object
Shout on a user’s shoutbox.
Class Method Details
.get_artist_tracks(params) ⇒ Object
Get a list of tracks by a given artist scrobbled by this user, including scrobble time. Can be limited to specific timeranges, defaults to all time.
15 16 17 |
# File 'lib/lastfm/user.rb', line 15 def get_artist_tracks( params ) LastFM.get( "user.getArtistTracks", params ) end |
.get_banned_tracks(params) ⇒ Object
Get a list of tracks banned by a user.
25 26 27 |
# File 'lib/lastfm/user.rb', line 25 def get_banned_tracks( params ) LastFM.get( "user.getBannedTracks", params ) end |
.get_events(params) ⇒ Object
Get a list of upcoming events that this user is attending.
36 37 38 |
# File 'lib/lastfm/user.rb', line 36 def get_events( params ) LastFM.get( "user.getEvents", params ) end |
.get_friends(params) ⇒ Object
Get a list of the user’s friends on Last.fm.
47 48 49 |
# File 'lib/lastfm/user.rb', line 47 def get_friends( params ) LastFM.get( "user.getFriends", params ) end |
.get_info(params) ⇒ Object
Get information about a user profile.
55 56 57 |
# File 'lib/lastfm/user.rb', line 55 def get_info( params ) LastFM.get( "user.getInfo", params ) end |
.get_loved_tracks(params) ⇒ Object
Get a list of tracks loved by a user.
65 66 67 |
# File 'lib/lastfm/user.rb', line 65 def get_loved_tracks( params ) LastFM.get( "user.getLovedTracks", params ) end |
.get_neighbors(params) ⇒ Object
Get a list of a user’s neighbours on Last.fm.
74 75 76 |
# File 'lib/lastfm/user.rb', line 74 def get_neighbors( params ) LastFM.get( "user.getNeighbonrs", params ) end |
.get_new_releases(params) ⇒ Object
Gets a list of upcoming releases based on a user’s musical taste.
83 84 85 |
# File 'lib/lastfm/user.rb', line 83 def get_new_releases( params ) LastFM.get( "user.getNewReleases", params ) end |
.get_past_events(params) ⇒ Object
Get a list of all events a user has attended in the past.
93 94 95 |
# File 'lib/lastfm/user.rb', line 93 def get_past_events( params ) LastFM.get( "user.getPastEvents", params ) end |
.get_personal_tags(params) ⇒ Object
Get the user’s personal tags.
105 106 107 |
# File 'lib/lastfm/user.rb', line 105 def ( params ) LastFM.get( "user.getPersonalTags", params ) end |
.get_playlists(params) ⇒ Object
Get a list of a user’s playlists.
113 114 115 |
# File 'lib/lastfm/user.rb', line 113 def get_playlists( params ) LastFM.get( "user.getPlaylists", params ) end |
.get_recent_stations(params) ⇒ Object
Get a list of the recent Stations listened to by a user.
123 124 125 126 |
# File 'lib/lastfm/user.rb', line 123 def get_recent_stations( params ) LastFM.requires_authentication LastFM.get( "user.getRecentStations", params, :secure ) end |
.get_recent_tracks(params) ⇒ Object
Get a list of the recent tracks listened to by a user. Also includes the currently playing track with the nowplaying=“true” attribute if the user is currently listening.
138 139 140 |
# File 'lib/lastfm/user.rb', line 138 def get_recent_tracks( params ) LastFM.get( "user.getRecentTracks", params ) end |
.get_recommended_artists(params) ⇒ Object
Get Last.fm artist recommendations for a user.
147 148 149 150 |
# File 'lib/lastfm/user.rb', line 147 def get_recommended_artists( params ) LastFM.requires_authentication LastFM.get( "user.getRecommendedArtists", params, :secure ) end |
.get_recommended_events(params) ⇒ Object
Get a paginated list of all events recommended to a user by Last.fm, based on their listening profile.
157 158 159 160 |
# File 'lib/lastfm/user.rb', line 157 def get_recommended_events( params ) LastFM.requires_authentication LastFM.get( "user.getRecommendedEvents", params, :secure ) end |
.get_shouts(params) ⇒ Object
Get shouts for a user.
168 169 170 |
# File 'lib/lastfm/user.rb', line 168 def get_shouts( params ) LastFM.get( "user.getShouts", params, :secure ) end |
.get_top_albums(params) ⇒ Object
Get the top albums listened to by a user, based on an optional time period.
179 180 181 |
# File 'lib/lastfm/user.rb', line 179 def get_top_albums( params ) LastFM.get( "user.getTopAlbums", params ) end |
.get_top_artists(params) ⇒ Object
Get the top artists listened to by a user, based on an optional time period.
190 191 192 |
# File 'lib/lastfm/user.rb', line 190 def get_top_artists( params ) LastFM.get( "user.getTopArtists", params ) end |
.get_top_tags(params) ⇒ Object
Get the top tags used by a user.
199 200 201 |
# File 'lib/lastfm/user.rb', line 199 def ( params ) LastFM.get( "user.getTopTags", params ) end |
.get_top_tracks(params) ⇒ Object
Get the top tracks listened to by a user, based on an optional time period.
210 211 212 |
# File 'lib/lastfm/user.rb', line 210 def get_top_tracks( params ) LastFM.get( "user.getTopTracks", params ) end |
.get_weekly_album_chart(params) ⇒ Object
Get an album chart for a user, for a given date range. Defaults to the most recent chart.
220 221 222 |
# File 'lib/lastfm/user.rb', line 220 def get_weekly_album_chart( params ) LastFM.get( "user.getWeeklyAlbumChart", params ) end |
.get_weekly_artist_chart(params) ⇒ Object
Get an artist chart for a user, for a given date range. Defaults to the most recent chart.
230 231 232 |
# File 'lib/lastfm/user.rb', line 230 def get_weekly_artist_chart( params ) LastFM.get( "user.getWeeklyArtistChart", params ) end |
.get_weekly_chart_list(params) ⇒ Object
Get a list of available charts for this user, expressed as date ranges which can be sent to the chart services.
238 239 240 |
# File 'lib/lastfm/user.rb', line 238 def get_weekly_chart_list( params ) LastFM.get( "user.getWeeklyChartList", params ) end |
.get_weekly_track_chart(params) ⇒ Object
Get a track chart for a user, for a given date range. Defaults to the most recent chart.
248 249 250 |
# File 'lib/lastfm/user.rb', line 248 def get_weekly_track_chart( params ) LastFM.get( "user.getWeeklyTrackChart", params ) end |
.shout(params) ⇒ Object
Shout on a user’s shoutbox.
257 258 259 260 |
# File 'lib/lastfm/user.rb', line 257 def shout( params ) LastFM.requires_authentication LastFM.post( "user.shout", params ) end |