ruby - 是否有使用 Google Images API 的 Ruby gem?

标签 ruby ruby-on-rails-3 gem

我需要在我的 Rails 应用程序上与 Google Images API 对话。是否有 Ruby gem 可以做到这一点?我发现了一个使用已弃用 API 的旧 gem。

最佳答案

有一个名为 google_custom_search_api 的 gem,它使用较新的 google 自定义搜索 API: https://github.com/wiseleyb/google_custom_search_api

您可以通过为 searchType 参数指定 image 将其限制为图像搜索,如下所示:

 results = GoogleCustomSearchApi.search("poker", {"searchType" => "image"})

关于ruby - 是否有使用 Google Images API 的 Ruby gem?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9182933/

相关文章:

Ruby/Mechanize 有什么方法可以耗尽 RAM? -> 分配内存失败

Ruby - 动态地向类添加属性(在运行时)

ruby-on-rails - 调试事件资源

ruby-on-rails-3 - 导轨 3 : How to get a custom restful member route without ID

gem - 在 Windows 8 上使用 gem 安装 SASS

ruby-on-rails - 有人试过在 Ubuntu 中同时从 RVM 和 deb 安装 Ruby 吗?

ruby - 检测递归调用

ruby-on-rails - rails : refactoring chained where clauses

ruby - 如何替换 Ruby 1.9 上的 Unicode gem?

ruby - bundler vs RVM vs gems vs RubyGems vs gemsets vs system ruby