Module: KewegoParty::Client::Auth

Included in:
KewegoParty::Client
Defined in:
lib/kewego_party/client/auth.rb

Instance Method Summary collapse

Instance Method Details

#auth_get_auth_token(options = {}) ⇒ String

Generates a user token needed for adding and updating data in kewego

Examples:

receive the user token

KewegoParty.auth_get_auth_token

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :username(configuration.login). (String)

    User name to login

  • :password(configuration.password). (String)

    Password to login

Returns:

  • (String)

    returns the user token

See Also:



13
14
15
16
17
# File 'lib/kewego_party/client/auth.rb', line 13

def auth_get_auth_token(options = {})
  options = {:appToken => app_token, :username => self., :password => self.password}.merge options
  response = get('/api/getAuthToken/', options, 2)
  process_response(response, [:token])
end

#auth_get_login_token(options = {}) ⇒ String

Generates a user token needed for adding and updating data in kewego

Examples:

receive the user token

KewegoParty.

Parameters:

  • options (Hash) (defaults to: {})

    A customizable set of options.

Options Hash (options):

  • :username(configuration.login). (String)

    User name to login

  • :password(configuration.password). (String)

    Password to login

Returns:

  • (String)

    returns the user token

See Also:



28
29
30
31
32
# File 'lib/kewego_party/client/auth.rb', line 28

def (options = {})
  options = {:appToken => app_token, :username => self., :password => self.password}.merge options
  response = get('/api/getLoginToken/', options, 2)
  process_response(response, [:token])
end