我需要在我的 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/