class Yandex::Disk::Client::Request::List

Constants

HEADERS

Public Class Methods

new(http, path) click to toggle source
# File lib/yandex/disk/client/request/list.rb, line 8
def initialize http, path
  @http = http
  @path = path
end

Public Instance Methods

perform() click to toggle source
# File lib/yandex/disk/client/request/list.rb, line 13
def perform
  response = @http.run_request :propfind, @path, nil, HEADERS
  parse_result = parse(response.body)
  parse_result.list
end

Private Instance Methods

parse(body) click to toggle source
# File lib/yandex/disk/client/request/list.rb, line 81
def parse body
  list_parser = ListParser.new

  parser = Nokogiri::XML::SAX::Parser.new(list_parser)
  parser.parse(body)

  list_parser
end