Class: Nozbe::LoginApiCall
Overview
This class is used internaly by the User class to make the API call that login the user
Constant Summary
Constants inherited from ApiCall
Instance Attribute Summary
Attributes inherited from ApiCall
#action, #parameters, #required_parameters
Instance Method Summary collapse
-
#initialize(user) ⇒ LoginApiCall
constructor
A new instance of LoginApiCall.
-
#parse(json) ⇒ Object
Parse the JSON response, and return the user_key (may be nil).
Methods inherited from ApiCall
action, #build_query_string, #build_request_path, #call, #do_request, #url_encode
Constructor Details
#initialize(user) ⇒ LoginApiCall
Returns a new instance of LoginApiCall.
32 33 34 |
# File 'lib/nozbe/user.rb', line 32 def initialize(user) super(nil, {:email => user.email, :password => user.password}) end |
Instance Method Details
#parse(json) ⇒ Object
Parse the JSON response, and return the user_key (may be nil)
36 37 38 39 |
# File 'lib/nozbe/user.rb', line 36 def parse(json) res = super(json) res["key"] end |