Class: Wufoo::Client
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(url, api_key) ⇒ Client
constructor
A new instance of Client.
- #post(path, data) ⇒ Object
Constructor Details
#initialize(url, api_key) ⇒ Client
Returns a new instance of Client.
7 8 9 |
# File 'lib/wufoo/client.rb', line 7 def initialize(url, api_key) @url, @api_key = url, api_key end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
5 6 7 |
# File 'lib/wufoo/client.rb', line 5 def api_key @api_key end |
#url ⇒ Object
Returns the value of attribute url.
5 6 7 |
# File 'lib/wufoo/client.rb', line 5 def url @url end |
Instance Method Details
#post(path, data) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/wufoo/client.rb', line 11 def post(path, data) data.merge!({ :w_api_key => api_key, }) self.class.post("#{@url}#{path}", :query => data, :format => :json) end |