class VkMusic::Request::PlaylistSection

Playlist in web-mobile request

Public Class Methods

new(owner_id, playlist_id, access_hash, offset, client_id) click to toggle source

Initialize new request @param owner_id [Integer] @param playlist_id [Integer] @param access_hash [String, nil] @param offset [Integer] @param client_id [Integer]

Calls superclass method VkMusic::Request::Base::new
# File lib/vk_music/request/playlist_section.rb, line 13
def initialize(owner_id, playlist_id, access_hash, offset, client_id)
  @client_id = client_id
  super(
    "#{VK_ROOT}/audio",
    {
      act: 'load_section', type: 'playlist', offset: offset, utf8: true,
      owner_id: owner_id, playlist_id: playlist_id, access_hash: access_hash.to_s
    },
    'GET',
    {}
  )
end

Private Instance Methods

after_call() click to toggle source
# File lib/vk_music/request/playlist_section.rb, line 30
def after_call
  @parser = WebParser::PlaylistSection.new(@response, client_id: @client_id)
end