Method: Mints::Contact#login

Defined in:
lib/contact.rb

#login(email, password) ⇒ Object

Login.

Starts a contact session.

Parameters

email

(String) – The email that will be logged.

password

(String) – The password of the email.

Example

@mints_contact.("[email protected]", "password")


54
55
56
57
58
59
60
61
62
63
64
# File 'lib/contact.rb', line 54

def (email, password)
  data = {
    email: email,
    password: password
  }
  response = @client.raw("post", "/contacts/login", nil, {data: data}.to_json)
  if response.key? "session_token"
    @client.session_token = response["session_token"]
  end
  return response
end