🚨 Shai-Hulud Strikes Again:834 Packages Compromised.Technical Analysis →
Socket
Book a DemoInstallSign in
Socket

youtube_images

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

youtube_images

bundlerRubyGems.org
Version
1.0.1
Version published
Maintainers
1
Created
Source

Getting Started Build Status Code Climate

YouTube Images can be used to extract thumbnails/images for a given youtube video ID or URL without a developer ID. It uses a URL constructor instead of an API

Requirement

Ruby 1.9 or greater

Installation

YouTube Images is released as a Ruby Gem. The gem is to be installed within a Ruby or Rails application. To install, simply add the following to your Gemfile:

# Gemfile
gem 'youtube_images'

After updating your bundle, you can use YouTubeImages::For("video-id") function within your ruby code

Usage

For example if you want to fetch the default thumbnail for youtube URL you can do something like this

YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:default]
# or
YouTubeImages::For("5zVaFjSxAZs")[:default]

Advanced Usage

YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")

will return a hash for default, medium, high and maximum dimension images

So to access different dimension images you can do something like this

YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:medium]
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:high]
YouTubeImages::For("http://www.youtube.com/watch?v=5zVaFjSxAZs")[:maximum]

FAQs

Package last updated on 29 May 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts