Class: Yt::Collections::Playlists
- Defined in:
- lib/yt/collections/playlists.rb
Instance Method Summary collapse
- #delete_all(params = {}) ⇒ Object
-
#insert(options = {}) ⇒ Object
Valid body (no defaults) are: title (string), description (string), privacy_status (string), tags (array of strings).
Methods inherited from Base
Methods included from Actions::List
Constructor Details
This class inherits a constructor from Yt::Collections::Base
Instance Method Details
#delete_all(params = {}) ⇒ Object
22 23 24 |
# File 'lib/yt/collections/playlists.rb', line 22 def delete_all(params = {}) do_delete_all params end |
#insert(options = {}) ⇒ Object
Valid body (no defaults) are: title (string), description (string), privacy_status (string), tags (array of strings)
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/yt/collections/playlists.rb', line 10 def insert( = {}) body = {} snippet = .slice :title, :description, :tags body[:snippet] = snippet if snippet.any? status = [:privacy_status] body[:status] = {privacyStatus: status} if status do_insert body: body, params: {part: 'snippet,status'} end |