Class: Yt::Collections::ResumableSessions
- Defined in:
- lib/yt/collections/resumable_sessions.rb
Overview
Provides methods to upload videos with the resumable upload protocol.
Resources with resumable sessions are: accounts.
Instance Method Summary collapse
-
#insert(content_length, body = {}) ⇒ Object
Starts a resumable session by sending to YouTube the metadata of the object to upload.
Methods inherited from Base
Methods included from Actions::List
Constructor Details
This class inherits a constructor from Yt::Collections::Base
Instance Method Details
#insert(content_length, body = {}) ⇒ Object
Starts a resumable session by sending to YouTube the metadata of the object to upload. If the request succeeds, YouTube returns a unique URL to upload the object file (and eventually resume the upload).
18 19 20 21 |
# File 'lib/yt/collections/resumable_sessions.rb', line 18 def insert(content_length, body = {}) @headers = headers_for content_length do_insert body: body, headers: @headers end |