{"id":18883973,"url":"https://github.com/unsplash/tinplate","last_synced_at":"2025-10-12T19:17:04.870Z","repository":{"id":4072038,"uuid":"51877170","full_name":"unsplash/tinplate","owner":"unsplash","description":"⭐️ TinEye API wrapper","archived":false,"fork":false,"pushed_at":"2025-05-15T15:18:16.000Z","size":59,"stargazers_count":14,"open_issues_count":0,"forks_count":5,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-17T20:52:27.101Z","etag":null,"topics":["api","reverse-image-search","tineye"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/unsplash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-16T23:06:11.000Z","updated_at":"2025-06-10T13:36:36.000Z","dependencies_parsed_at":"2025-06-05T22:37:47.666Z","dependency_job_id":"0062e8ad-0c8d-49f9-af93-8664190b27c8","html_url":"https://github.com/unsplash/tinplate","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/unsplash/tinplate","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsplash%2Ftinplate","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsplash%2Ftinplate/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsplash%2Ftinplate/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsplash%2Ftinplate/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/unsplash","download_url":"https://codeload.github.com/unsplash/tinplate/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/unsplash%2Ftinplate/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279012645,"owners_count":26085158,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","reverse-image-search","tineye"],"created_at":"2024-11-08T07:10:05.067Z","updated_at":"2025-10-12T19:17:04.848Z","avatar_url":"https://github.com/unsplash.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tinplate\n\nWrapper 'round the [TinEye API](https://services.tineye.com/developers/tineyeapi/).\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'tinplate'\n```\n\nAnd then execute:\n\n```bash\n$ bundle\n```\n\nOr install it yourself as:\n\n```bash\n$ gem install tinplate\n```\n\n## Configuration\n\nFirst you've got to let Tinplate know what your TinEye API keys are. In a Rails app, for example, this would go in an initializer, e.g. `config/intitializers/tinplate.rb`:\n\n```ruby\nTinplate.configure do |config|\n  config.private_key = \"YOUR PRIVATE API KEY\"\n  config.test        = false\nend\n```\n\nIf `test` is set to `true` (which is also the default), Tinplate will use [TinEye's test keys and sandbox environment](https://services.tineye.com/developers/tineyeapi/sandbox.html).\n\n\n## Usage\n\nThere are only three API actions available: `search`, `remaining_searches` (to check the status of your account), and `image_count` (if you're curious how many total images TinEye has indexed).\n\n`remaining_searches` returns an `OpenStruct` object with three attributes: `remaining_searches`, `start_date`, and `expire_date`.\n\n`image_count` returns a plain old integer.\n\n### Search examples\n\n#### Search by URL\n\n```ruby\ntineye = Tinplate::TinEye.new\nresults = tineye.search(image_url: \"http://example.com/photo.jpg\")\n\nresults.stats.total_results    # =\u003e 2\nresults.stats.total_backlinks  # =\u003e 3\nresults.matches                # =\u003e an Array of matched images (see below)\n\nresults.matches.each do |match|\n  # Do what you like with this matched image. The world is your oyster.\nend\n```\n\n#### Search by upload\n\n```ruby\ntineye = Tinplate::TinEye.new\nresults = tineye.search(image_path: \"/home/alice/example.jpg\")\n```\n\n#### Optional search parameters\n\n`offset`: Default 0    \n`limit`:  Default 100    \n`sort`:   \"score\", \"size\", or \"crawl_date\". Default \"score\".    \n`order`:  \"asc\" or \"desc\". Default \"desc\".\n\n#### Example matched image\n\nAn `OpenStruct` object with the following attributes (/w example values):\n\n```ruby\ndomain: \"ucsb.edu\",\ntop_level_domain: \"ucsb.edu\",\nwidth: 400\nheight: 300\nsize: 50734,\nfilesize: 195840,\nscore: 88.9,\ntags: [\"collection\"],\nimage_url: \"http://images.tineye.com/result/0f1e84b7b7538e8e7de048f4d45eb8f579e3e999941b3341ed9a754eb447ebb1\",\nformat: \"JPEG\",\ncontributor: true,\noverlay: \"overlay/507bb6bf9a397284e2330be7c0671aadc7319b4b/0f1e84b7b7538e8e7de048f4d45eb8f579e3e999941b3341ed9a754eb447ebb1?m21=-9.06952e-05\u0026m22=0.999975\u0026m23=0.0295591\u0026m11=0.999975\u0026m13=-0.0171177\u0026m12=9.06952e-05\",\nbacklinks:\n  # These are also OpenStruct objects, not Hashes.\n  [\n    {\n      url: \"http://example-copier.com/photo.jpg\",\n      crawl_date: \"2012-06-30\",\n      backlink: \"http://example-copier.com/photo.jpg\"\n    }\n  ]\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/unsplash/tinplate. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funsplash%2Ftinplate","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Funsplash%2Ftinplate","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Funsplash%2Ftinplate/lists"}