Method: Mints::User#login
- Defined in:
- lib/user.rb
#login(email, password) ⇒ Object
54 55 56 57 58 59 60 61 62 63 64 |
# File 'lib/user.rb', line 54 def login(email, password) data = { email: email, password: password, } response = @client.raw("post", "/users/login", nil, data.to_json, '/api/v1', {'no_content_type': true}) if response.key? "api_token" @client.session_token = response["api_token"] end return response end |