https://github.com/chrismou/phergie-irc-plugin-react-audioscrobbler
Phergie plugin for returning the current or last played song for a user on last.fm or libre.fm (https://github.com/phergie/phergie-irc-bot-react)
https://github.com/chrismou/phergie-irc-plugin-react-audioscrobbler
Last synced: 2 months ago
JSON representation
Phergie plugin for returning the current or last played song for a user on last.fm or libre.fm (https://github.com/phergie/phergie-irc-bot-react)
- Host: GitHub
- URL: https://github.com/chrismou/phergie-irc-plugin-react-audioscrobbler
- Owner: chrismou
- License: bsd-2-clause
- Created: 2014-12-18T09:40:59.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-03-24T15:07:53.000Z (about 9 years ago)
- Last Synced: 2025-01-28T02:44:47.318Z (4 months ago)
- Language: PHP
- Homepage:
- Size: 105 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Last.fm / Libre.fm plugin for [Phergie](http://github.com/phergie/phergie-irc-bot-react/)
[Phergie](http://github.com/phergie/phergie-irc-bot-react/) plugin for returning the current or last played song for a user on last.fm or libre.fm.
[](https://scrutinizer-ci.com/g/chrismou/phergie-irc-plugin-react-audioscrobbler/build-status/master)
[](https://codeclimate.com/github/chrismou/phergie-irc-plugin-react-audioscrobbler/coverage)
[](https://codeclimate.com/github/chrismou/phergie-irc-plugin-react-audioscrobbler)
[](https://www.paypal.me/chrismou)## About
[Phergie](http://github.com/phergie/phergie-irc-bot-react/) 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).## Install
The recommended method of installation is [through composer](http://getcomposer.org).
```JSON
composer require chrismou/phergie-irc-plugin-react-audioscrobbler
```See Phergie documentation for more information on
[installing and enabling plugins](https://github.com/phergie/phergie-irc-bot-react/wiki/Usage#plugins).## Configuration
For last.fm lookups, you need a free API key which you can get from [here](http://www.last.fm/api).
LibreFM works out of the box.```php
new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array(
'lastfm' => 'YOUR_API_KEY'
))
```## CommandHelp compatibility
The plugin activates lastfm when it sees you've included a lastfm config, so in order to get [CommandHelp](http://github.com/phergie/phergie-irc-plugin-react-commandhelp/)
to show the plugin in it's command list , you'll need to pass a mock value:```php
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.
## Tests
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
```## License
Released under the BSD License. See `LICENSE`.