0.0.1 • Published 8 years ago

@joegesualdo/get-youtube-video-thumbnail-url-js v0.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
8 years ago

@joegesualdo/get-youtube-video-thumbnail-url-js Build Status

Get the thumbnail image for a youtube video.

Install

$ npm install --save @joegesualdo/get-youtube-video-thumbnail-url-js

Usage

import getThumbnailUrl from '@joegesualdo/get-youtube-video-thumbnail-url-js';

getThumbnailUrl('wHkK6mbFUTk', 'xlarge');
//=> https://i.ytimg.com/vi/wHkK6mbFUTk/maxresdefault.jpg

API

getYoutubeVideoThumbnailUrl(videoId, [size])

Get the image url of the thumbnail

NameTypeDescription
videoIdStringThe id of the youtube video
sizeStringThe image size you want. The options are small, medium, large, and xlarge

Returns: String, the url of the thumbnail

import getThumbnailUrl from '@joegesualdo/get-youtube-video-thumbnail-url-js';

getThumbnailUrl('wHkK6mbFUTk', 'xlarge');
//=> https://i.ytimg.com/vi/wHkK6mbFUTk/maxresdefault.jpg

Test

$ npm test

Build

$ npm run build

License

MIT © Joe Gesualdo