Profile
A comprehensive guide on how to use all profile-related API calls with the LearnCard Network Plugin
Last updated
Was this helpful?
A comprehensive guide on how to use all profile-related API calls with the LearnCard Network Plugin
Last updated
Was this helpful?
To create a new profile, use the createProfile
method. This method accepts an object containing the profile information, excluding the did
and isServiceProfile
properties.
To create a new service profile, use the createServiceProfile
method. This method accepts an object containing the profile information, excluding the did
and isServiceProfile
properties.
To update an existing profile, use the updateProfile
method. This method accepts an object containing the profile information that you want to update, excluding the did
and isServiceProfile
properties.
To delete an existing profile, use the deleteProfile
method. This method does not require any parameters.
To retrieve a specific profile, use the getProfile
method. This method accepts an optional profileId
parameter. If no profileId
is provided, it returns the current user's profile.
To search for profiles, use the searchProfiles
method. This method accepts an optional profileId
parameter and an options
object. The options
object can contain the following properties:
limit
: Maximum number of profiles to return.
includeSelf
: Whether to include the current user's profile in the results.
includeConnectionStatus
: Whether to include connection status in the results.
These are all the profile-related API calls available with the LearnCard Network Plugin. Use these methods to manage and interact with user profiles on the LearnCard Network.
To send a connection request to another profile, use the connectWith
method. This method accepts a profileId
parameter.
To connect with another profile using an invite, use the connectWithInvite
method. This method requires a profileId
and a challenge
parameter.
To cancel a pending connection request, use the cancelConnectionRequest
method. This method accepts a profileId
parameter.
To disconnect from an existing connection, use the disconnectWith
method. This method accepts a profileId
parameter.
To accept a connection request from another profile, use the acceptConnectionRequest
method. This method accepts a profileId
parameter.
To retrieve all connections, use the getConnections
method. This method does not require any parameters.
To retrieve all pending connections, use the getPendingConnections
method. This method does not require any parameters.
To retrieve all connection requests, use the getConnectionRequests
method. This method does not require any parameters.
To generate an invite, use the generateInvite
method. This method now accepts two parameters: a challenge
and an expiration
parameter. The challenge
parameter is optional and will be automatically generated if not provided. The expiration
parameter sets the duration (in seconds) for which the invite remains valid and defaults to 30 days if not specified.
These are all the connection-related API calls available with the LearnCard Network Plugin. Use these methods to manage and interact with connections on the LearnCard Network.
To block a profile, use the blockProfile
method. This method accepts a profileId
parameter.
To unblock a profile, use the unblockProfile
method. This method accepts a profileId
parameter.
To retrieve all blocked profiles, use the getBlockedProfiles
method. This method does not require any parameters.
These are all the user-blocking related API calls available with the LearnCard Network Plugin. Use these methods to manage and control user-blocking on the LearnCard Network.
Creates a profile for a user
/profile/create
^http
Creates a service profile
/profile/create-service
^http
This route updates the profile of the current user
/profile
^http
This route searches for profiles based on their profileId
/search/profiles/{input}
This route shows the current user's connections. Warning! This route is deprecated and currently has a hard limit of returning only the first 50 connections. Please use paginatedConnections instead!
/profile/connections
This route shows the current user's pending connections. Warning! This route is deprecated and currently has a hard limit of returning only the first 50 connections. Please use paginatedPendingConnections instead
/profile/pending-connections
This route shows the current user's pending connections. Warning! This route is deprecated and currently has a hard limit of returning only the first 50 connections. Please use paginatedPendingConnections instead
/profile/pending-connections
This route creates a one-time challenge that an unknown profile can use to connect with this account
/profile/generate-invite