Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
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

  • 1.0.1
  • Rubygems
  • Socket score

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc