2017 © Pedro Peláez
 

library phergie-irc-plugin-react-google

Phergie plugin for returning Google search results and estimated result counts

image

chrismou/phergie-irc-plugin-react-google

Phergie plugin for returning Google search results and estimated result counts

  • Thursday, March 24, 2016
  • by chrismou
  • Repository
  • 1 Watchers
  • 1 Stars
  • 232 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 1 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Google plugin for Phergie

Phergie plugin for returning Google search results and estimated result counts., (*1)

Build Status Test Coverage Code Climate Buy me a beer, (*2)

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., (*3)

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

Install

The recommended method of installation is through composer., (*5)

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

See Phergie documentation for more information on installing and enabling plugins., (*6)

Configuration

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

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:, (*8)

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., (*9)

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., (*10)

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:, (*11)

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:, (*12)

./vendor/bin/dunit

License

Released under the BSD License. See LICENSE., (*13)

The Versions

02/02 2015

1.0.1

1.0.1.0 http://github.com/chrismou/phergie-irc-plugin-react-google

Phergie plugin for returning Google search results and estimated result counts

  Sources   Download

BSD-2-Clause

The Requires

 

The Development Requires

plugin bot irc phergie

12/01 2015