PHP 클래스 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).
상속: extends Phergie_Plugin_Abstract
파일 보기 프로젝트 열기: phergie/phergie

보호된 프로퍼티들

프로퍼티 타입 설명
$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

공개 메소드들

메소드 설명
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.

메소드 상세

getScrobbled() 공개 메소드

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
리턴 string Formatted string of the most recent track played

onCommandLastfm() 공개 메소드

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

onCommandLibrefm() 공개 메소드

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

onLoad() 공개 메소드

Check for dependencies.
public onLoad ( ) : void
리턴 void

프로퍼티 상세

$http 보호되어 있는 프로퍼티

HTTP plugin
protected Phergie_Plugin_Http $http
리턴 Phergie_Plugin_Http

$lastfmUrl 보호되어 있는 프로퍼티

Last.FM API entry point
protected string $lastfmUrl
리턴 string

$librefmUrl 보호되어 있는 프로퍼티

Libre.FM API entry point
protected string $librefmUrl
리턴 string

$query 보호되어 있는 프로퍼티

Scrobbler query string for user.getRecentTracks
protected string $query
리턴 string