Class: Shortwave::Facade::Event

Inherits:
Remote
  • Object
show all
Defined in:
lib/shortwave/facade/lastfm.rb

Instance Attribute Summary

Attributes inherited from Remote

#session

Instance Method Summary collapse

Methods inherited from Remote

#initialize

Constructor Details

This class inherits a constructor from Shortwave::Facade::Remote

Instance Method Details

#attend(event, status) ⇒ Object

Set a user’s attendance status for an event.

event

The numeric last.fm event id

status

The attendance status (0=Attending, 1=Maybe attending, 2=Not attending)



799
800
801
# File 'lib/shortwave/facade/lastfm.rb', line 799

def attend(event, status)
  post(:session, {:method => "event.attend", :event => event, :status => status})
end

#attendees(event) ⇒ Object

Get a list of attendees for an event.

event

The numeric last.fm event id



783
784
785
# File 'lib/shortwave/facade/lastfm.rb', line 783

def attendees(event)
  get(:standard, {:method => "event.getAttendees", :event => event})
end

#info(event) ⇒ Object

Get the metadata for an event on Last.fm. Includes attendance and lineup information.

event

The numeric last.fm event id



806
807
808
# File 'lib/shortwave/facade/lastfm.rb', line 806

def info(event)
  get(:standard, {:method => "event.getInfo", :event => event})
end

#share(event, recipient, options = {}) ⇒ Object

Share an event with one or more Last.fm users or other friends.

event

An event ID

recipient

Email Address | Last.fm Username - A comma delimited list of email addresses or Last.fm usernames. Maximum is 10.

Options

message

An optional message to send with the recommendation. If not supplied a default message will be used.



776
777
778
# File 'lib/shortwave/facade/lastfm.rb', line 776

def share(event, recipient, options={})
  post(:session, {:method => "event.share", :event => event, :recipient => recipient}.merge(options))
end

#shout(event, message) ⇒ Object

Shout in this event’s shoutbox

event

The id of the event to shout on

message

The message to post to the shoutbox



791
792
793
# File 'lib/shortwave/facade/lastfm.rb', line 791

def shout(event, message)
  post(:session, {:method => "event.shout", :event => event, :message => message})
end

#shouts(event) ⇒ Object

Get shouts for this event. Also available as an rss feed.

event

The numeric last.fm event id



813
814
815
# File 'lib/shortwave/facade/lastfm.rb', line 813

def shouts(event)
  get(:standard, {:method => "event.getShouts", :event => event})
end