Last.fm / Libre.fm plugin for Phergie
Phergie plugin for returning the current or last played song for a user on last.fm or libre.fm.
Phergie plugin for returning the current or last played song for a user on last.fm or libre.fm. By default, the plugin responds to the commands "lastfm username" and "librefm username" (without the quotes).
The recommended method of installation is through composer.
composer require chrismou/phergie-irc-plugin-react-audioscrobbler
See Phergie documentation for more information on installing and enabling plugins.
For last.fm lookups, you need a free API key which you can get from here. LibreFM works out of the box.
new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
'lastfm' => 'YOUR_API_KEY'
))
The plugin activates lastfm when it sees you've included a lastfm config, so in order to get CommandHelp to show the plugin in it's command list , you'll need to pass a mock value:
new \Phergie\Irc\Plugin\React\CommandHelp\Plugin(array(
'plugins' => array(
new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
'lastfm' => true
)),
)
))
Adding this line to your CommandHelp config should force the lastfm command to be displayed.
To run the unit test suite:
curl -s https://getcomposer.org/installer | php
php composer.phar install
./vendor/bin/phpunit
If you use docker, you can also run the test suite against all supported PHP versions:
./vendor/bin/dunit
Released under the BSD License. See LICENSE
.