diff options
| author | mo khan <mo@mokhan.ca> | 2014-10-13 11:48:52 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2014-10-13 11:48:52 -0600 |
| commit | 5b1a2483bbaa8cfba1c8373b90789f546773cb58 (patch) | |
| tree | 9c80d8144ea9a42a8e65dd651d859a423870c1d0 /app/controllers/admin | |
| parent | dd53c55a98cbb965fd5947e288e5e10f96843101 (diff) | |
create amazon api abstraction.
Diffstat (limited to 'app/controllers/admin')
| -rw-r--r-- | app/controllers/admin/tools_controller.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/app/controllers/admin/tools_controller.rb b/app/controllers/admin/tools_controller.rb index 0bae31ad..fba8ec2d 100644 --- a/app/controllers/admin/tools_controller.rb +++ b/app/controllers/admin/tools_controller.rb @@ -1,15 +1,7 @@ module Admin class ToolsController < AdminController def index - @tools = search_for_tools(params[:q]) - end - - private - - def search_for_tools(query) - return [] if query.blank? - client = ASIN::Client.instance - client.search(Keywords: query, SearchIndex: :Kitchen, Sort: :salesrank) + @tools = AmazonAPI.new.search(params[:q]) end end end |
