Class: Yt::Collections::Resources

Inherits:
Base
  • Object
show all
Defined in:
lib/yt/collections/resources.rb

Direct Known Subclasses

Channels, Ownerships, PlaylistItems, Playlists

Instance Method Summary collapse

Methods inherited from Base

#initialize, of, #where

Methods included from Actions::List

#first!

Constructor Details

This class inherits a constructor from Yt::Collections::Base

Instance Method Details

#delete_all(params = {}) ⇒ Object



7
8
9
# File 'lib/yt/collections/resources.rb', line 7

def delete_all(params = {})
  do_delete_all params
end

#insert(attributes = {}, options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/yt/collections/resources.rb', line 11

def insert(attributes = {}, options = {}) #
  underscore_keys! attributes
  body = build_insert_body attributes
  params = {part: body.keys.join(',')}
  do_insert(params: params, body: body)
end