Class: LastFM::Api::Event
- Inherits:
-
Object
- Object
- LastFM::Api::Event
- Defined in:
- lib/lastfm/api/event.rb
Class Method Summary collapse
-
.attend(params) ⇒ Object
Set a user’s attendance status for an event.
-
.get_attendees(params) ⇒ Object
Get a list of attendees for an event.
-
.get_info(params) ⇒ Object
Get the metadata for an event on Last.fm.
-
.get_shouts(params) ⇒ Object
Get shouts for an event.
-
.share(params) ⇒ Object
Share an event with one or more Last.fm users or other friends.
-
.shout(params) ⇒ Object
Shout in an event’s shoutbox.
Class Method Details
.attend(params) ⇒ Object
Set a user’s attendance status for an event.
11 12 13 14 15 16 |
# File 'lib/lastfm/api/event.rb', line 11 def attend( params ) LastFM.requires_authentication status_codes = { attending: 0, maybe_attending: 1, not_attending: 2 } params[:status] = status_codes[params[:status]] if params.include?(:status) LastFM.post( "event.attend", params ) end |
.get_attendees(params) ⇒ Object
Get a list of attendees for an event.
24 25 26 |
# File 'lib/lastfm/api/event.rb', line 24 def get_attendees( params ) LastFM.get( "event.getAttendees", params ) end |
.get_info(params) ⇒ Object
Get the metadata for an event on Last.fm. Includes attendance and lineup information.
32 33 34 |
# File 'lib/lastfm/api/event.rb', line 32 def get_info( params ) LastFM.get( "event.getInfo", params ) end |
.get_shouts(params) ⇒ Object
Get shouts for an event.
42 43 44 |
# File 'lib/lastfm/api/event.rb', line 42 def get_shouts( params ) LastFM.get( "event.getShouts", params ) end |
.share(params) ⇒ Object
Share an event with one or more Last.fm users or other friends.
53 54 55 56 |
# File 'lib/lastfm/api/event.rb', line 53 def share( params ) LastFM.requires_authentication LastFM.post( "event.share", params ) end |
.shout(params) ⇒ Object
Shout in an event’s shoutbox.
63 64 65 66 |
# File 'lib/lastfm/api/event.rb', line 63 def shout( params ) LastFM.requires_authentication LastFM.post( "event.shout", params ) end |