Class: ApiBucket::Amazon::Response
- Inherits:
-
Base::Response
- Object
- Base::Response
- ApiBucket::Amazon::Response
- Defined in:
- lib/api_bucket/amazon/response.rb
Instance Attribute Summary
Attributes inherited from Base::Response
Instance Method Summary collapse
- #first_item ⇒ Object
-
#item_page ⇒ Object
Return current page no if :item_page option is when initiating the request.
- #items ⇒ Object
-
#total_pages ⇒ Object
Return total pages.
-
#total_results ⇒ Object
Return total results.
Methods inherited from Base::Response
Constructor Details
This class inherits a constructor from ApiBucket::Base::Response
Instance Method Details
#first_item ⇒ Object
9 10 11 |
# File 'lib/api_bucket/amazon/response.rb', line 9 def first_item @items[0] end |
#item_page ⇒ Object
Return current page no if :item_page option is when initiating the request.
14 15 16 |
# File 'lib/api_bucket/amazon/response.rb', line 14 def item_page @item_page ||= ApiBucket::Base::Element.get(@doc, "//ItemPage").to_i end |
#items ⇒ Object
5 6 7 |
# File 'lib/api_bucket/amazon/response.rb', line 5 def items @items ||= (@doc/"Item").collect { |item| ApiBucket::Amazon::Item.new(item) } end |