lib/survey_gizmo/survey_gizmo.rb in survey-gizmo-ruby-0.5.0 vs lib/survey_gizmo/survey_gizmo.rb in survey-gizmo-ruby-0.6.0
- old
+ new
@@ -11,18 +11,28 @@
require "survey_gizmo/api/survey"
require "survey_gizmo/api/question"
require "survey_gizmo/api/option"
require "survey_gizmo/api/page"
+require "survey_gizmo/api/response"
module SurveyGizmo
include HTTParty
format :json
+
+ # The base uri for this version of the API is $1
base_uri 'https://restapi.surveygizmo.com/v1'
+
@@options = {}
mattr_accessor :options
+ # Setup the account credentials to access the API
+ # @param [Hash] opts
+ # @option opts [#to_s] :user
+ # The username for your account. Usually your email address
+ # @option opts [#to_s] :password
+ # The account password
def self.setup(opts = {})
self.options = opts
default_params({"user:pass" => opts.values_at(:user, :password).join(':')})
end
\ No newline at end of file