Class: Yandex::Disk::Client::Request::List

Inherits:
Object
  • Object
show all
Defined in:
lib/yandex/disk/client/request/list.rb

Defined Under Namespace

Classes: ListParser

Constant Summary collapse

HEADERS =
{
  :Depth => 1
}

Instance Method Summary collapse

Constructor Details

#initialize(http, path) ⇒ List

Returns a new instance of List.



8
9
10
11
# File 'lib/yandex/disk/client/request/list.rb', line 8

def initialize http, path
  @http = http
  @path = path
end

Instance Method Details

#performObject



13
14
15
16
17
# 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