Class: Yt::Models::PlaylistItem

Inherits:
Resource show all
Defined in:
lib/yt/models/playlist_item.rb

Overview

Provides methods to interact with YouTube playlist items.

Instance Attribute Summary

Attributes inherited from Resource

#auth

Instance Method Summary collapse

Methods inherited from Resource

#initialize, #kind, #username

Methods included from Associations::HasReports

#has_report

Methods included from Associations::HasViewerPercentages

#has_viewer_percentages

Methods included from Associations::HasOne

#has_one

Methods included from Associations::HasMany

#has_many

Methods included from Associations::HasAuthentication

#has_authentication

Constructor Details

This class inherits a constructor from Yt::Models::Resource

Instance Method Details

#delete(options = {}) ⇒ Object



11
12
13
14
# File 'lib/yt/models/playlist_item.rb', line 11

def delete(options = {})
  do_delete {@id = nil}
  !exists?
end

#exists?Boolean

Returns:

  • (Boolean)


16
17
18
# File 'lib/yt/models/playlist_item.rb', line 16

def exists?
  !@id.nil?
end