PHP Class Phergie_Plugin_AudioScrobbler, phergie

TODO: Make the "nick-binding" use an SQLite database instead of having them hard-coded in to the config file. Configuration settings: "audioscrobbler.lastfm_api_key": API given by last.fm (string). "audioscrobbler.librefm_api_key": API key given by libre.fm (string).
Inheritance: extends Phergie_Plugin_Abstract
Afficher le fichier Open project: phergie/phergie

Protected Properties

Свойство Type Description
$http Phergie_Plugin_Http HTTP plugin
$lastfmUrl string Last.FM API entry point
$librefmUrl string Libre.FM API entry point
$query string Scrobbler query string for user.getRecentTracks

Méthodes publiques

Méthode Description
getScrobbled ( string $user, string $url, string $key ) : string Simple Scrobbler API function to get a formatted string of the most recent track played by a user.
onCommandLastfm ( string $user = null ) : void Command function to get a user's status on last.fm.
onCommandLibrefm ( string $user = null ) : void Command function to get a user's status on libre.fm.
onLoad ( ) : void Check for dependencies.

Method Details

getScrobbled() public méthode

Simple Scrobbler API function to get a formatted string of the most recent track played by a user.
public getScrobbled ( string $user, string $url, string $key ) : string
$user string Username to look up
$url string Base URL of the scrobbler service
$key string Scrobbler service API key
Résultat string Formatted string of the most recent track played

onCommandLastfm() public méthode

Command function to get a user's status on last.fm.
public onCommandLastfm ( string $user = null ) : void
$user string User identifier
Résultat void

onCommandLibrefm() public méthode

Command function to get a user's status on libre.fm.
public onCommandLibrefm ( string $user = null ) : void
$user string User identifier
Résultat void

onLoad() public méthode

Check for dependencies.
public onLoad ( ) : void
Résultat void

Property Details

$http protected_oe property

HTTP plugin
protected Phergie_Plugin_Http $http
Résultat Phergie_Plugin_Http

$lastfmUrl protected_oe property

Last.FM API entry point
protected string $lastfmUrl
Résultat string

$librefmUrl protected_oe property

Libre.FM API entry point
protected string $librefmUrl
Résultat string

$query protected_oe property

Scrobbler query string for user.getRecentTracks
protected string $query
Résultat string