lib/dailycred/client.rb in dailycred-0.3.0 vs lib/dailycred/client.rb in dailycred-0.3.1
- old
+ new
@@ -67,18 +67,28 @@
:user => user
}
post "/password/api/reset", opts
end
+ def login opts={}
+ opts[:pass] ||= opts[:password]
+ post "/user/api/signin.json", opts
+ end
+
+ def signup opts={}
+ opts[:pass] ||= opts[:password]
+ post "/user/api/signup.json", opts
+ end
+
# A wildcard for making any post requests to dailycred.
# client_id and client_secret are automatically added to the request
#
# - @param [string] url
# - @param [hash] opts
# - @param [boolean] secure whether the client_secret should be passed. Defaults to true
def post(url, opts, secure=true)
opts.merge! base_opts(secure)
- response = get_conn.post url, opts
+ Dailycred::Response.new(get_conn.post url, opts)
end
private
def ssl_opts
\ No newline at end of file