No commit activity in last 3 years
No release in over 3 years
A Lita handler for fetching images from Google.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Development

~> 1.3
>= 0
>= 3.0.0

Runtime

>= 4.0
 Project Readme

lita-google-images

Build Status Code Climate Coverage Status

lita-google-images is a handler for Lita that searches Google Images for images matching users' queries, and replies with links to them.

Installation

Add lita-google-images to your Lita instance's Gemfile:

gem "lita-google-images"

Configuration

Required attributes

* `google_cse_id` (String) - ID of the Google Custom Search account to use.
* `google_cse_key` (String) - API key for the Google Custom Search account.

Optional attributes

  • safe_search (String, Symbol) - The safe search setting to use when querying for images. Possible values are :high, :medium, and :off. Default: :high.

Example

Lita.configure do |config|
  config.handlers.google_images.safe_search = :off
end

Usage

The following are all equivalent ways of asking Lita to search for an image of "carl the pug":

Lita: image carl the pug
Lita: image me carl the pug
Lita: img carl the pug
Lita: img me carl the pug

The following are all equivalent ways of askign Lita to search for an animated GIF of "carl the pug":

Lita: animate carl the pug
Lita: animate me carl the pug
Lita: gif carl the pug
Lita: gif me carl the pug

The second form ("verb me") is to ease the transition for people coming from Hubot.

License

MIT