Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Aws
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13. Creating the Amazon Rails library This is a Ruby module that we include in your book controller. It contains the main processing logic of the mashup. It is used mainly to communicate with the Amazon ECS API provided by Amazon.com, using the Amazon ECS Ruby library by Herryanto Siatono. Create a Ruby file in the RAILS_ROOT/lib folder called amazon.rb. For those uninitiated in Ruby on Rails, all Ruby files placed here are directly accessible to the Rails application during run time. This is why we only need to add the line include Amazon in the controller. require 'amazon/ecs' module Amazon @@key_id = <your Amazon.com access key ID> @@associate_id = <your associate ID> # get the details of the book given the ASIN def get_book_details(asin) book = Hash.new
14.
15.
16.
17.
18. This view file will show the sidebar with the details of the book. Now let's quickly preview the fruits of your labor! Start the server with: $./script/server Then go to http://localhost:3000/books/sidebar