Class: PassaporteWeb::Resources::SignUp

Inherits:
Base
  • Object
show all
Defined in:
lib/passaporte_web/resources/sign_up.rb

Overview

A wrapper to PassaporteWeb's sign up API

API

Documentation:

Examples:

Inviting a new user to PassaporteWeb (on behalf of an existing user):

client = PassaporteWeb::Client::Identity.new(credentials)
client..create('[email protected]')

Inviting a new user to PassaporteWeb (on behalf of an application):

client = PassaporteWeb::Client::Application.new
client..create('[email protected]')

See Also:

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from PassaporteWeb::Resources::Base

Instance Method Details

#create(email) ⇒ PassaporteWeb::Entities::SignUp

Invites an user to PassaporteWeb, by creating a new sign up.

API

Method: POST /api/v1/sign_up

Documentation:

Parameters:

  • email (String)

    The new user's email.

Returns:


27
28
29
# File 'lib/passaporte_web/resources/sign_up.rb', line 27

def create(email)
  respond_with_entity(api.post('/api/v1/sign_up', body: MultiJson.dump({ invited: email })))
end