Class: Alexa::API::Base
Direct Known Subclasses
CategoryBrowse, CategoryListings, SitesLinkingIn, TrafficHistory, UrlInfo
Instance Attribute Summary collapse
-
#arguments ⇒ Object
readonly
Returns the value of attribute arguments.
-
#response_body ⇒ Object
readonly
Returns the value of attribute response_body.
Instance Method Summary collapse
-
#initialize(credentials) ⇒ Base
constructor
A new instance of Base.
- #parsed_body ⇒ Object
Methods included from Utils
Constructor Details
#initialize(credentials) ⇒ Base
Returns a new instance of Base.
8 9 10 11 12 13 |
# File 'lib/alexa/api/base.rb', line 8 def initialize(credentials) if MultiXml.parser.to_s == "MultiXml::Parsers::Ox" raise StandardError, "MultiXml parser is set to :ox - alexa gem will not work with it currently, use one of: :libxml, :nokogiri, :rexml" end @credentials = credentials end |
Instance Attribute Details
#arguments ⇒ Object (readonly)
Returns the value of attribute arguments.
6 7 8 |
# File 'lib/alexa/api/base.rb', line 6 def arguments @arguments end |
#response_body ⇒ Object (readonly)
Returns the value of attribute response_body.
6 7 8 |
# File 'lib/alexa/api/base.rb', line 6 def response_body @response_body end |
Instance Method Details
#parsed_body ⇒ Object
15 16 17 |
# File 'lib/alexa/api/base.rb', line 15 def parsed_body @parsed_body ||= MultiXml.parse(response_body) end |