0.0
No commit activity in last 3 years
No release in over 3 years
Ruby wrapper for the IncandescentAPI
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.16
~> 0.13
~> 2.1
~> 10.0
~> 3.7
~> 4
 Project Readme

Incandescent

Build Status Maintainability

Ruby wrapper for reverse image search via the Incadescent API

Installation

Add this line to your application's Gemfile:

gem 'incandescent'

And then execute:

$ bundle

Or install it yourself as:

$ gem install incandescent

Usage

client = Client.new(uid, api_key)

# The following line can be called multiple times to search multiple images
client.add_image_url('http://example.com/image.jpg')

# We have to separate the search initiation and results retrieval because
# retrieval may take several attempts (and a minutes-long lag) before completing.
client.initiate_search
hosts = client.get_results

hosts.each do |host|
  host.name   # pinterest.com

  # Page is not a great name for each of these result objects, but it matches the API format.
  host.pages.each do |page|
    page.page          # http://thief.example.com/my-stolen-photos.html
    page.source        # google OR bing OR <etc>
    page.date          # Unix timestamp
    page.usage_image   # URL for the discovered image
    page.usage_height  # Pixel height of discovered image
    page.usage_width   # Pixel width of discovered image
    page.image         # URL for the original image to search with
    page.iid           # Incandescent ID for the original image
  end
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/pugetive/incandescent.

License

The gem is available as open source under the terms of the MIT License.