Class: Sappy::Request

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

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(account, action, parameters) ⇒ Request

Returns a new instance of Request.



7
8
9
# File 'lib/sappy/request.rb', line 7

def initialize(, action, parameters)
  @account, @action, @parameters = , action, parameters
end

Class Method Details

.perform(account, action, parameters) ⇒ Object



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

def self.perform(, action, parameters)
  new(, action, parameters).perform
end

Instance Method Details

#performObject



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

def perform
  response = http.get("#{uri.path}?#{query_string}")
  Responses.for(@action).parse(response.body)
end