PHP Class Phergie_Plugin_Youtube, phergie

Inheritance: extends Phergie_Plugin_Abstract
Show file Open project: phergie/phergie

Public Methods

Method Description
onCommandYoutube ( string $query ) : void Returns the first result of a YouTube search.
onLoad ( ) : void Checks for dependencies.
renderUrl ( array $parsed ) : boolean Renders YouTube URLs.

Protected Methods

Method Description
queryYoutube ( string $query ) : object Queries the YouTube video search web service, processes the first result, and sends a message back to the current event source.

Method Details

onCommandYoutube() public method

Returns the first result of a YouTube search.
public onCommandYoutube ( string $query ) : void
$query string Search query
return void

onLoad() public method

Checks for dependencies.
public onLoad ( ) : void
return void

queryYoutube() protected method

Queries the YouTube video search web service, processes the first result, and sends a message back to the current event source.
protected queryYoutube ( string $query ) : object
$query string Search term
return object YouTube result object

renderUrl() public method

Renders YouTube URLs.
public renderUrl ( array $parsed ) : boolean
$parsed array parse_url() output for the URL to render
return boolean TRUE if the URL was rendered successfully, FALSE otherwise