chrismou/phergie-irc-plugin-react-google 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

chrismou/phergie-irc-plugin-react-google

最新稳定版本:v2.1.1

Composer 安装命令:

composer require chrismou/phergie-irc-plugin-react-google

包简介

Phergie plugin for returning Google search results and estimated result counts

README 文档

README

Phergie plugin for returning Google search results and estimated result counts.

Build Status Test Coverage Code Climate Buy me a beer

About

This plugin provides a simple method for performing Google lookups from within IRC. By default, the plugin accepts one of 2 commands (google and googlecount) and outputs either the top result for your search query, or the estimated result count.

I'd also recommend installing the CommandAlias plugin, which can be used to alias the commands (ie, to use "g" instead of "google").

Install

The recommended method of installation is through composer.

composer require chrismou/phergie-irc-plugin-react-google

See Phergie documentation for more information on installing and enabling plugins.

Configuration

This plugin requires the Command plugin to recognise commands, and the http plugin to query Google for your search results.

If you're new to Phergie or Phergie plugins, see the Phergie setup instructions for more information. Otherwise, add the following references to your config file:

return array(
    // ...
    'plugins' => array(
        new \Chrismou\Phergie\Plugin\Google\Plugin,
        new \Phergie\Irc\Plugin\React\Command\Plugin,  // dependency
        new \Phergie\Plugin\Dns\Plugin,                // dependency
        new \Phergie\Plugin\Http\Plugin	               // dependency
    )
)

By default, the plugin will respond to "google" for Google searches, and "googlecount" for estimated results. counts.

Or, you can pass references to the providers you want to use as a config array, where the array key is the command you want the bot to respond to and the value is the class to use.

new \Chrismou\Phergie\Plugin\Google\Plugin(array(
    'providers' => array(
        "google" => "Chrismou\\Phergie\\Plugin\\Google\\Provider\\GoogleSearch",
        "googlecount" => "Chrismou\\Phergie\\Plugin\\Google\\Provider\\GoogleSearchCount"
    )
)),

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.

统计信息

  • 总下载量: 245
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2014-12-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固