A array of YouTubeG::Model::Category objects that describe the videos categories.
Description of the video.
Duration of a video in seconds.
Description of the video.
An array of words associated with the video.
An array of YouTubeG::Model::Content objects describing the individual media content data available for this video. Most, but not all, videos offer this.
Specifies that a video may or may not be embedded on other websites.
The link to watch the URL on YouTubes website.
Specifies the order in which the video appears in a playlist.
When the video was published on Youtube.
Specifies that a video is flagged as adult or not.
Information about the videos rating.
An array of YouTubeG::Model::Thumbnail objects that contain information regarding the videos thumbnail images.
Title for the video.
When the video’s data was last updated.
String: Specifies a URI that uniquely and permanently identifies the video.
Number of times that the video has been viewed
Geodata
Provides a URL and various other types of information about a video.
YouTubeG::Model::Content: Data about the embeddable video.
# File lib/youtube_g/model/video.rb, line 161 def default_media_content @media_content.find { |c| c.is_default? } end
Gives you the HTML to embed the video on your website.
String: The HTML for embedding the video on your website.
# File lib/youtube_g/model/video.rb, line 169 def embed_html(width = 425, height = 350) <<EDOC <object width="#{width}" height="#{height}"> <param name="movie" value="#{embed_url}"></param> <param name="wmode" value="transparent"></param> <embed src="#{embed_url}" type="application/x-shockwave-flash" wmode="transparent" width="#{width}" height="#{height}"></embed> </object> EDOC end
The URL needed for embedding the video in a page.
String: Absolute URL for embedding video
# File lib/youtube_g/model/video.rb, line 184 def embed_url @player_url.sub('watch?', '').sub('=', '/') end
Allows you to check whether the video can be embedded on a webpage.
Boolean: True if the video can be embedded, false if not.
# File lib/youtube_g/model/video.rb, line 153 def embeddable? not @noembed end
Video responses to the current video.
YouTubeG::Response::VideoSearch
# File lib/youtube_g/model/video.rb, line 132 def responses YouTubeG::Parser::VideosFeedParser.new("http://gdata.youtube.com/feeds/api/videos/#{unique_id}/responses").parse end
The ID of the video, useful for searching for the video again without having to store it anywhere. A regular query search, with this id will return the same video.
>> video.unique_id => "ZTUVgYoeN_o"
String: The Youtube video id.
# File lib/youtube_g/model/video.rb, line 145 def unique_id video_id[/videos\/([^<]+)/, 1] end