Class: Alexa::API::SitesLinkingIn

Inherits:
Base
  • Object
show all
Defined in:
lib/alexa/api/sites_linking_in.rb

Instance Attribute Summary

Attributes inherited from Base

#arguments, #response_body

Instance Method Summary collapse

Methods inherited from Base

#initialize, #parsed_body

Methods included from Utils

camelize, safe_retrieve

Constructor Details

This class inherits a constructor from Alexa::API::Base

Instance Method Details

#fetch(arguments = {}) ⇒ Object

Raises:



6
7
8
9
10
11
12
13
14
15
# File 'lib/alexa/api/sites_linking_in.rb', line 6

def fetch(arguments = {})
  raise ArgumentError, "You must specify url" unless arguments.has_key?(:url)
  @arguments = arguments

  @arguments[:count] = arguments.fetch(:count, 20)
  @arguments[:start] = arguments.fetch(:start, 0)

  @response_body = Alexa::Connection.new(@credentials).get(params)
  self
end

#request_idObject



27
28
29
# File 'lib/alexa/api/sites_linking_in.rb', line 27

def request_id
  @request_id ||= safe_retrieve(parsed_body, "SitesLinkingInResponse", "Response", "OperationRequest", "RequestId")
end

#sitesObject

Response attributes



19
20
21
# File 'lib/alexa/api/sites_linking_in.rb', line 19

def sites
  @sites ||= safe_retrieve(parsed_body, "SitesLinkingInResponse", "Response", "SitesLinkingInResult", "Alexa", "SitesLinkingIn", "Site")
end

#status_codeObject



23
24
25
# File 'lib/alexa/api/sites_linking_in.rb', line 23

def status_code
  @status_code ||= safe_retrieve(parsed_body, "SitesLinkingInResponse", "Response", "ResponseStatus", "StatusCode")
end