Class: PassaporteWeb::Resources::Widget

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

Overview

A wrapper to PassaporteWeb's widget API

API

Documentation:

Examples:

Obtaining the user's navbar URL:

client = PassaporteWeb::Client::Identity.new(credentials)
client.widget.navbar_url

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

Retrieves the user's navbar URL

API

Method: GET /api/v1/widgets/navbar

Documentation:

Returns:

  • (String)

    user's navbar URL


25
26
27
# File 'lib/passaporte_web/resources/widget.rb', line 25

def navbar_url
  %(#{PassaporteWeb.configuration.url}/api/v1/widgets/navbar?access_token=#{api.token})
end