Class: Ryext::Request

Inherits:
Object
  • Object
show all
Defined in:
lib/ryext/request.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account, query, method = 'GET') ⇒ Request

Returns a new instance of Request.



5
6
7
8
9
# File 'lib/ryext/request.rb', line 5

def initialize(, query, method = 'GET')
  @account = 
  @query = query
  @method = method
end

Instance Attribute Details

#accountObject (readonly)

Returns the value of attribute account.



3
4
5
# File 'lib/ryext/request.rb', line 3

def 
  @account
end

#methodObject (readonly)

Returns the value of attribute method.



3
4
5
# File 'lib/ryext/request.rb', line 3

def method
  @method
end

#queryObject (readonly)

Returns the value of attribute query.



3
4
5
# File 'lib/ryext/request.rb', line 3

def query
  @query
end

Instance Method Details

#api_key?Boolean

Returns:

  • (Boolean)


19
20
21
# File 'lib/ryext/request.rb', line 19

def api_key?
  !.api_key.nil?
end

#raw_responseObject



15
16
17
# File 'lib/ryext/request.rb', line 15

def raw_response
  api_key? && request_response
end

#responseObject



11
12
13
# File 'lib/ryext/request.rb', line 11

def response
  Response.new(raw_response, query)
end