Class: Yandex::Disk::Client::Request::Publication
- Inherits:
-
Object
- Object
- Yandex::Disk::Client::Request::Publication
- Defined in:
- lib/yandex/disk/client/request/publication.rb
Defined Under Namespace
Classes: AttributesParser
Constant Summary collapse
- BODY =
'<propertyupdate xmlns="DAV:"> <set> <prop> <public_url xmlns="urn:yandex:disk:meta">true</public_url> </prop> </set> </propertyupdate>'- HEADERS =
{ }
Instance Method Summary collapse
-
#initialize(http, path) ⇒ Publication
constructor
A new instance of Publication.
- #perform ⇒ Object
Constructor Details
#initialize(http, path) ⇒ Publication
15 16 17 18 |
# File 'lib/yandex/disk/client/request/publication.rb', line 15 def initialize http, path @http = http @path = path end |
Instance Method Details
#perform ⇒ Object
20 21 22 23 24 |
# File 'lib/yandex/disk/client/request/publication.rb', line 20 def perform response = @http.run_request :proppatch, @path, BODY, HEADERS parse_result = parse(response.body) { :public_url => parse_result.public_url } end |