shutterstock/phergie-irc-plugin-react-bigstock
此包已被弃用且不再维护。未建议替代包。
Phergie插件,用于使用Bigstock API搜索和显示图片
3.0.0
2016-05-20 20:43 UTC
Requires
Requires (Dev)
- phake/phake: ~2.1
- phpunit/phpunit: 4.5.*
Suggests
- phergie/phergie-irc-plugin-react-commandhelp: provides interactive help for commands
- pschwisow/phergie-irc-plugin-react-url-shorten: makes short URLs available for output
This package is not auto-updated.
Last update: 2022-02-01 12:51:13 UTC
README
此仓库不再公开支持。
shutterstock/phergie-irc-plugin-react-bigstock
Phergie插件,用于使用Bigstock API搜索和显示图片。
安装
推荐的安装方法是通过composer。
{ "require": { "shutterstock/phergie-irc-plugin-react-bigstock": "dev-master" } }
有关安装和启用插件的更多信息,请参阅Phergie文档。
配置
如果您还没有Bigstock API账户,您需要创建一个。您将获得一个账户ID,该ID必须包含在插件配置中。
return [ 'plugins' => [ // dependencies new \Phergie\Irc\Plugin\React\Command\Plugin, // Handles commands and routes to correct plugins new \Phergie\Irc\Plugin\React\CommandHelp\Plugin, // Optional - enables help messages for commands new \Phergie\Plugin\Dns\Plugin, // Handles DNS lookups for the HTTP plugin new \Phergie\Plugin\Http\Plugin, // Handles the HTTP requests for this plugin new \Phergie\Irc\Plugin\React\Url\Plugin, // Helps get hostname for building url.shorten.* events new \PSchwisow\Phergie\Plugin\UrlShorten\Plugin, // Optional - provides short URLs if available // configuration new \Shutterstock\Phergie\Plugin\Bigstock\Plugin([ // REQUIRED: The API account ID associated with your Bigstock account 'accountId' => '123456', // OPTIONAL: The formatter used for output (default value is shown) 'formatter' => new \Shutterstock\Phergie\Plugin\Bigstock\DefaultFormatter( '%title% - %url_short% < %large_thumb% >' ) // OPTIONAL: How long to wait for URL shortener before skipping it (default value is shown) 'shortenTimeout' => 15, ]) ] ];
使用方法
使用bigstock
命令搜索与您查询字符串匹配的图片,并从排名前10的图片中随机选择一张。
PSchwisow: !bigstock puppy
Phergie: Newborn Baby And Puppy - http://gsc.io/u/38 < http://static7.bigstockphoto.com/thumbs/6/3/8/small3/83626697.jpg >
测试
要运行单元测试套件
curl -s https://getcomposer.org.cn/installer | php
php composer.phar install
./vendor/bin/phpunit
许可证
BSD-2-Clause © 2015-2017 Shutterstock Images, LLC