Class: Conify::Api::Users

Inherits:
AbstractApi show all
Defined in:
lib/conify/api/users.rb

Instance Method Summary collapse

Methods inherited from AbstractApi

#add_headers, #delete, #form_request, #get, #handle_json_response, #http, #json_request, #post, #put, #ssl_check_win

Methods included from Helpers

#allow_user_response, #ask_for_conflux_creds, #ask_for_password, #ask_for_password_on_windows, #camelize, #display, #echo_off, #echo_on, #error, #exclusive_deep_merge, #format_with_bang, #host, #host_url, #kensa_manifest_name, #kensa_manifest_path, #manifest_content, #manifest_filename, #manifest_path, #manually_added_methods, #open_url, #running_on_a_mac?, #running_on_windows?, #site_url, #to_table, #with_tty

Instance Method Details

#extensionObject



5
6
7
# File 'lib/conify/api/users.rb', line 5

def extension
  '/users'
end

#login(creds) ⇒ Object

Exchange email/password for Conflux user_token



10
11
12
13
14
15
16
# File 'lib/conify/api/users.rb', line 10

def (creds)
  post(
    "#{extension}/login",
    data: creds,
    error_message: "Invalid credentials.\nMake sure you have a valid Conflux account before proceeding."
  )
end