Class: Qualaroo::Client

Inherits:
Object
  • Object
show all
Includes:
HTTParty
Defined in:
lib/qualaroo.rb

Instance Method Summary collapse

Constructor Details

#initialize(key, secret) ⇒ Client

Returns a new instance of Client.



9
10
11
# File 'lib/qualaroo.rb', line 9

def initialize(key, secret)
  @auth = {username: key, password: secret}
end

Instance Method Details

#responses(survey_id, options = {}) ⇒ Object



13
14
15
16
# File 'lib/qualaroo.rb', line 13

def responses(survey_id, options={})
  options.merge!(basic_auth: @auth)
  self.class.get "/nudges/#{survey_id}/responses.json", options
end