class BestbuyApi::Response

Constants

PAGE_VARS

Public Class Methods

new(result, path) click to toggle source
# File lib/bestbuy_api/response.rb, line 5
def initialize(result, path)
  @result = result
  @path = path
end

Public Instance Methods

items() click to toggle source
# File lib/bestbuy_api/response.rb, line 10
def items
  @result[@path] if @result.key?(@path)
end
pagination() click to toggle source
# File lib/bestbuy_api/response.rb, line 14
def pagination
  @result.select { |key| PAGE_VARS.include?(key) }
end
url() click to toggle source
# File lib/bestbuy_api/response.rb, line 18
def url
  @result.request.last_uri.to_s
end