Class: Shortwave::Facade::Group

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

#members(group) ⇒ Object

Get a list of members for this group.

group

The group name to fetch the members of.



304
305
306
# File 'lib/shortwave/facade/lastfm.rb', line 304

def members(group)
  get(:standard, {:method => "group.getMembers", :group => group})
end

#weekly_album_chart(group, options = {}) ⇒ Object

Get an album chart for a group, for a given date range. If no date range is supplied, it will return the most recent album chart for this group.

group

Group name

Options

from

The date at which the chart should start from. See Group.getWeeklyChartList for more.

to

The date at which the chart should end on. See Group.getWeeklyChartList for more.



322
323
324
# File 'lib/shortwave/facade/lastfm.rb', line 322

def weekly_album_chart(group, options={})
  get(:standard, {:method => "group.getWeeklyAlbumChart", :group => group}.merge(options))
end

#weekly_artist_chart(group, options = {}) ⇒ Object

Get an artist chart for a group, for a given date range. If no date range is supplied, it will return the most recent album chart for this group.

group

The last.fm group name to fetch the charts of.

Options

from

The date at which the chart should start from. See Group.getWeeklyChartList for more.

to

The date at which the chart should end on. See Group.getWeeklyChartList for more.



344
345
346
# File 'lib/shortwave/facade/lastfm.rb', line 344

def weekly_artist_chart(group, options={})
  get(:standard, {:method => "group.getWeeklyArtistChart", :group => group}.merge(options))
end

#weekly_chart_list(group) ⇒ Object

Get a list of available charts for this group, expressed as date ranges which can be sent to the chart services.

group

The last.fm group name to fetch the charts list for.



311
312
313
# File 'lib/shortwave/facade/lastfm.rb', line 311

def weekly_chart_list(group)
  get(:standard, {:method => "group.getWeeklyChartList", :group => group})
end

#weekly_track_chart(group, options = {}) ⇒ Object

Get a track chart for a group, for a given date range. If no date range is supplied, it will return the most recent album chart for this group.

group

The last.fm group name to fetch the charts of.

Options

from

The date at which the chart should start from. See Group.getWeeklyChartList for more.

to

The date at which the chart should end on. See Group.getWeeklyChartList for more.



333
334
335
# File 'lib/shortwave/facade/lastfm.rb', line 333

def weekly_track_chart(group, options={})
  get(:standard, {:method => "group.getWeeklyTrackChart", :group => group}.merge(options))
end