Class: VideoInfo::Providers::YoutubePlaylist
- Inherits:
-
Youtube
show all
- Defined in:
- lib/video_info/providers/youtubeplaylist.rb
Instance Attribute Summary collapse
#data, #iframe_attributes, #options, #url, #video_id
Class Method Summary
collapse
Instance Method Summary
collapse
Methods inherited from Youtube
#provider, #thumbnail_large, #thumbnail_large_2x, #thumbnail_maxres, #thumbnail_medium, #thumbnail_small
#available?, #embed_code, #thumbnail, #thumbnail_large_2x, #thumbnail_maxres
Constructor Details
#initialize(url, options = {}) ⇒ YoutubePlaylist
Returns a new instance of YoutubePlaylist.
10
11
12
13
14
15
16
17
18
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 10
def initialize(url, options = {})
super(url, options)
if VideoInfo.provider_api_keys[:youtube].nil?
extend YoutubePlaylistScraper
else
extend YoutubePlaylistAPI
end
end
|
Instance Attribute Details
#playlist_items_data ⇒ Object
Returns the value of attribute playlist_items_data.
8
9
10
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 8
def playlist_items_data
@playlist_items_data
end
|
Class Method Details
.usable?(url) ⇒ Boolean
20
21
22
23
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 20
def self.usable?(url)
url =~ %r{((youtube\.com)\/playlist)|
((youtube\.com)\/embed\/videoseries)}x
end
|
Instance Method Details
#date ⇒ Object
25
26
27
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 25
def date
nil
end
|
#duration ⇒ Object
29
30
31
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 29
def duration
nil
end
|
#embed_url ⇒ Object
41
42
43
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 41
def embed_url
"//www.youtube.com/embed/videoseries?list=#{playlist_id}"
end
|
#keywords ⇒ Object
33
34
35
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 33
def keywords
nil
end
|
#view_count ⇒ Object
37
38
39
|
# File 'lib/video_info/providers/youtubeplaylist.rb', line 37
def view_count
nil
end
|