Class: Shortwave::Model::User
- Includes:
- WeeklyCharts
- Defined in:
- lib/shortwave/model/user.rb
Instance Method Summary collapse
- #compare_with(other_user) ⇒ Object
-
#events ⇒ Object
Returns the events that this user is attending.
-
#friends ⇒ Object
Returns the first 50 of a user’s friends on Last.fm.
-
#loved_tracks ⇒ Object
Returns tracks a user has “loved”.
-
#neighbours ⇒ Object
Returns other Last.fm users with similar taste to this user.
-
#past_events ⇒ Object
Returns the events a user has attended.
-
#playlists ⇒ Object
Returns a user’s playlists.
-
#recent_tracks ⇒ Object
Returns the recent tracks played by this user.
-
#recommended_artists ⇒ Object
Returns the first 50 artists this user may be interested in.
-
#recommended_events ⇒ Object
Returns events this user may be interested in.
Methods included from WeeklyCharts
#album_chart, #artist_chart, #chart_dates, #track_chart
Methods inherited from BaseModel
facade_name, identified_by, inherited, link_to, #session=, sharable, shoutable, taggable
Instance Method Details
#compare_with(other_user) ⇒ Object
65 66 67 |
# File 'lib/shortwave/model/user.rb', line 65 def compare_with(other_user) Comparison.parse(@session.tasteometer_facacde.compare("user", "user", name, other_user.name), :single => true) end |
#events ⇒ Object
Returns the events that this user is attending.
21 22 23 |
# File 'lib/shortwave/model/user.rb', line 21 def events link :events, :Event, name end |
#friends ⇒ Object
Returns the first 50 of a user’s friends on Last.fm
46 47 48 |
# File 'lib/shortwave/model/user.rb', line 46 def friends link :friends, :User, name end |
#loved_tracks ⇒ Object
Returns tracks a user has “loved”.
36 37 38 |
# File 'lib/shortwave/model/user.rb', line 36 def loved_tracks link :loved_tracks, :Track, name end |
#neighbours ⇒ Object
Returns other Last.fm users with similar taste to this user.
41 42 43 |
# File 'lib/shortwave/model/user.rb', line 41 def neighbours link :neighbours, :User, name end |
#past_events ⇒ Object
Returns the events a user has attended.
26 27 28 |
# File 'lib/shortwave/model/user.rb', line 26 def past_events link :past_events, :Event, name end |
#playlists ⇒ Object
Returns a user’s playlists
51 52 53 |
# File 'lib/shortwave/model/user.rb', line 51 def playlists link :playlists, :Playlist, name end |
#recent_tracks ⇒ Object
Returns the recent tracks played by this user.
31 32 33 |
# File 'lib/shortwave/model/user.rb', line 31 def recent_tracks link :recent_tracks, :Track, name end |
#recommended_artists ⇒ Object
Returns the first 50 artists this user may be interested in.
61 62 63 |
# File 'lib/shortwave/model/user.rb', line 61 def recommended_artists link :recommended_artists, :Artist end |
#recommended_events ⇒ Object
Returns events this user may be interested in.
56 57 58 |
# File 'lib/shortwave/model/user.rb', line 56 def recommended_events link :recommended_events, :Event end |