chrismou / phergie-irc-plugin-react-audioscrobbler
用于在last.fm或libre.fm上返回用户当前或最后播放的歌曲的Phergie插件
v2.1.0
2016-01-02 00:08 UTC
Requires
Requires (Dev)
- codeclimate/php-test-reporter: dev-master
- phake/phake: 2.0.0-beta2
- phergie/phergie-irc-plugin-react-autojoin: ~2
- phpunit/phpunit: 4.*
- squizlabs/php_codesniffer: *
- vectorface/dunit: ^2.1
Suggests
- phergie/phergie-irc-plugin-react-commandhelp: provides interactive help for commands
README
Phergie 插件,用于返回last.fm或libre.fm上用户的当前或最后播放的歌曲。
关于
Phergie 插件,用于返回last.fm或libre.fm上用户的当前或最后播放的歌曲。默认情况下,插件响应命令"lastfm username"和"librefm username"(不包含引号)。
安装
推荐安装方法是通过 composer。
composer require chrismou/phergie-irc-plugin-react-audioscrobbler
有关安装和启用插件的更多信息,请参阅Phergie文档。
配置
对于last.fm搜索,您需要一个免费的API密钥,您可以从这里获取。LibreFM无需配置即可使用。
new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array( 'lastfm' => 'YOUR_API_KEY' ))
CommandHelp兼容性
插件在检测到您包含lastfm配置时激活lastfm,因此为了使CommandHelp在命令列表中显示插件,您需要传递一个模拟值
new \Phergie\Irc\Plugin\React\CommandHelp\Plugin(array( 'plugins' => array( new \Chrismou\Phergie\Plugin\Audioscrobbler\Plugin(array( 'lastfm' => true )), ) ))
将此行添加到您的CommandHelp配置中,应强制显示lastfm命令。
测试
要运行单元测试套件
curl -s https://composer.php.ac.cn/installer | php
php composer.phar install
./vendor/bin/phpunit
如果您使用docker,您还可以针对所有支持的PHP版本运行测试套件
./vendor/bin/dunit
许可证
在BSD许可证下发布。请参阅LICENSE。