Skip to content

domdinnes/hubot-youtube

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hubot-youtube

A hubot script for searching YouTube

See src/youtube.coffee for full documentation.

Installation

In hubot project repo, run:

npm install hubot-youtube --save

Then add hubot-youtube to your external-scripts.json:

[
  "hubot-youtube"
]

Enable the "YouTube Data API v3" permission from the API menu.

Enable v3

Create a "Public" token rather than the OAuth credentials for this particular implementation.

Get Public Token

Copy your token to the HUBOT_YOUTUBE_API_KEY environment variable.

export HUBOT_YOUTUBE_API_KEY=<your token>

Learn more about how to generate Google credentials.

Optionally set flag for deterministic searching

If you want hubot to only return the most relevant result rather than randomly one of the top 15 results, set the environment variable HUBOT_YOUTUBE_DETERMINISTIC_RESULTS.

export HUBOT_YOUTUBE_DETERMINISTIC_RESULTS=true

Optionally set flag for listening on public channel

If you want hubot to listen every messages (without mentioning him) on public channel

export HUBOT_YOUTUBE_HEAR=true

Sample Interaction

user1> hubot youtube no no no cat remix
hubot> http://www.youtube.com/watch?v=z7OJ3vDqyw8&feature=youtube_gdata

About

A hubot script for searching YouTube

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 83.9%
  • Shell 8.8%
  • CoffeeScript 7.3%