ProfileApi

This class implements BaseApi.

This is a JavaScript implementation of the Profile API.

For ease of use we recommend using the User object for interaction instead.

Interfaces

OrganizationProfileInfoWithId

interface OrganizationProfileInfoWithId implements OrganizationProfileInfo {
    id: number
}

OrganizationProfileInfo

interface OrganizationProfileInfo {
    name: string,
    address?: string,
    city?: string,
    country?: string,
    state?: string,
    website?: string,
    verified?: boolean,
    uniqueId?: string,
    zipCode?: string
}

ProfileInfo

Methods

constructor(user, endpoint)

Create a Profile API object.

  • user should be an instance of the User object.

  • endpoint should be the Vulos Identity endpoint.

async info(id)

Get an user's public profile by the user's ID.

The result implements the ProfileInfo interface.

This method's response has the profile:info cache prefix.

async organization(id)

Get an organization's public profile by the organization's ID.

The result implements the OrganizationProfileInfo interface.

This method's response has the profile:organization cache prefix.

async organizationSearch(search, amount, offset)

Search for an organization by name using a string.

  • search is the string we are searching with in the organization's name;

  • amount is the maximal amount of elements that can be returned (absolute maximal is 100, default is 10), this argument is optional;

  • offset is the amount of organizations that will get skipped in the result (default is 0), this argument is optional;

The result implements the OrganizationProfileInfoWithId interface.

This method's response has the profile:organization:search cache prefix.

Last updated