Class: Brainzz::PlaylistItemsCommand

Inherits:
DataCommand show all
Defined in:
lib/brainzz/commands/playlist_items_command.rb

Class Method Summary collapse

Methods inherited from DataCommand

api_key, base_url

Class Method Details

.execute(playlist_id, response) ⇒ Object



4
5
6
7
8
9
10
11
12
13
# File 'lib/brainzz/commands/playlist_items_command.rb', line 4

def execute(playlist_id, response)
  playlist_items_params = PlaylistItemsParams.new(playlist_id, response)

  if playlist_items_params.valid?
    response = get(playlist_items_params)
    PlaylistItemsResponse.new response
  else
    PlaylistItemsResponse.new
  end
end