Class: LastFM::Api::User
- Inherits:
-
Object
- Object
- LastFM::Api::User
- Defined in:
- lib/lastfm/api/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.
16 17 18 |
# File 'lib/lastfm/api/user.rb', line 16 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.
26 27 28 |
# File 'lib/lastfm/api/user.rb', line 26 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.
37 38 39 |
# File 'lib/lastfm/api/user.rb', line 37 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.
48 49 50 |
# File 'lib/lastfm/api/user.rb', line 48 def get_friends( params ) LastFM.get( "user.getFriends", params ) end |
.get_info(params) ⇒ Object
Get information about a user profile.
56 57 58 |
# File 'lib/lastfm/api/user.rb', line 56 def get_info( params ) LastFM.get( "user.getInfo", params ) end |
.get_loved_tracks(params) ⇒ Object
Get a list of tracks loved by a user.
66 67 68 |
# File 'lib/lastfm/api/user.rb', line 66 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.
75 76 77 |
# File 'lib/lastfm/api/user.rb', line 75 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.
84 85 86 |
# File 'lib/lastfm/api/user.rb', line 84 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.
94 95 96 |
# File 'lib/lastfm/api/user.rb', line 94 def get_past_events( params ) LastFM.get( "user.getPastEvents", params ) end |
.get_personal_tags(params) ⇒ Object
Get the user’s personal tags.
106 107 108 |
# File 'lib/lastfm/api/user.rb', line 106 def ( params ) LastFM.get( "user.getPersonalTags", params ) end |
.get_playlists(params) ⇒ Object
Get a list of a user’s playlists.
114 115 116 |
# File 'lib/lastfm/api/user.rb', line 114 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.
124 125 126 127 |
# File 'lib/lastfm/api/user.rb', line 124 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.
139 140 141 |
# File 'lib/lastfm/api/user.rb', line 139 def get_recent_tracks( params ) LastFM.get( "user.getRecentTracks", params ) end |
.get_recommended_artists(params) ⇒ Object
Get Last.fm artist recommendations for a user.
148 149 150 151 |
# File 'lib/lastfm/api/user.rb', line 148 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.
158 159 160 161 |
# File 'lib/lastfm/api/user.rb', line 158 def get_recommended_events( params ) LastFM.requires_authentication LastFM.get( "user.getRecommendedEvents", params, :secure ) end |
.get_shouts(params) ⇒ Object
Get shouts for a user.
169 170 171 |
# File 'lib/lastfm/api/user.rb', line 169 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.
180 181 182 |
# File 'lib/lastfm/api/user.rb', line 180 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.
191 192 193 |
# File 'lib/lastfm/api/user.rb', line 191 def get_top_artists( params ) LastFM.get( "user.getTopArtists", params ) end |
.get_top_tags(params) ⇒ Object
Get the top tags used by a user.
200 201 202 |
# File 'lib/lastfm/api/user.rb', line 200 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.
211 212 213 |
# File 'lib/lastfm/api/user.rb', line 211 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.
221 222 223 |
# File 'lib/lastfm/api/user.rb', line 221 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.
231 232 233 |
# File 'lib/lastfm/api/user.rb', line 231 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.
239 240 241 |
# File 'lib/lastfm/api/user.rb', line 239 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.
249 250 251 |
# File 'lib/lastfm/api/user.rb', line 249 def get_weekly_track_chart( params ) LastFM.get( "user.getWeeklyTrackChart", params ) end |
.shout(params) ⇒ Object
Shout on a user’s shoutbox.
258 259 260 261 |
# File 'lib/lastfm/api/user.rb', line 258 def shout( params ) LastFM.requires_authentication LastFM.post( "user.shout", params ) end |