Class: NexaasID::Resources::Profile

Inherits:
Base
  • Object
show all
Defined in:
lib/nexaas_id/resources/profile.rb

Overview

A wrapper to Nexaas ID's profile API

API

Documentation:

Examples:

Getting the user's profile:

client = NexaasID::Client::Identity.new(credentials)
client.profile.get

Getting the user's list of emails:

client = NexaasID::Client::Identity.new(credentials)
client.profile.emails

See Also:

Instance Attribute Summary

Attributes inherited from Base

#configuration

Instance Method Summary collapse

Methods inherited from Base

#initialize

Constructor Details

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

Instance Method Details

#contactsNexaasID::Entities::Profile::Contacts

Retrieves the user's contacts

API

Method: GET /api/v1/profile/contacts

Documentation:


50
51
52
53
# File 'lib/nexaas_id/resources/profile.rb', line 50

def contacts
  respond_with_entity(api.get('/api/v1/profile/contacts'),
                      NexaasID::Entities::Profile::Contacts)
end

#emailsNexaasID::Entities::Profile::Emails

Retrieves the user's emails

API

Method: GET /api/v1/profile/emails

Documentation:


63
64
65
66
# File 'lib/nexaas_id/resources/profile.rb', line 63

def emails
  respond_with_entity(api.get('/api/v1/profile/emails'),
                      NexaasID::Entities::Profile::Emails)
end

#getNexaasID::Entities::Profile

Retrieves the user's profile

API

Method: GET /api/v1/profile

Documentation:


25
26
27
# File 'lib/nexaas_id/resources/profile.rb', line 25

def get
  respond_with_entity(api.get('/api/v1/profile'))
end

#professional_infoNexaasID::Entities::Profile::ProfessionalInfo

Retrieves the user's professional info

API

Method: GET /api/v1/profile/professional_info

Documentation:


37
38
39
40
# File 'lib/nexaas_id/resources/profile.rb', line 37

def professional_info
  respond_with_entity(api.get('/api/v1/profile/professional_info'),
                      NexaasID::Entities::Profile::ProfessionalInfo)
end