Skip to main content

UserApiClient

Contains all the endpoints needed to manage users.

Constructors

new UserApiClient()

new UserApiClient(): UserApiClient

Returns

UserApiClient

Methods

addUserAvatar()

static addUserAvatar(data, config?): Promise<SCAvatarType>

This endpoint adds an avatar to my avatars.

Parameters

ParameterTypeDescription
dataFormData
config?AxiosRequestConfig<any>

Returns

Promise<SCAvatarType>

Source

services/user/index.ts:573


changeUserMail()

static changeUserMail(id, new_email, confirm?, send_email?, config?): Promise<any>

This endpoint changes the email of the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
new_emailstring
confirm?boolean
send_email?boolean
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:214


changeUserPassword()

static changeUserPassword(id, password, new_password, config?): Promise<any>

This endpoint changes the password of the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
passwordstring
new_passwordstring
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:259


checkUserConnections()

static checkUserConnections(id, config?): Promise<SCUserConnectionStatusType>

This endpoint returns is_connection = true if the user (identified in path) is connected with me.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserConnectionStatusType>

Source

services/user/index.ts:407


checkUserEmailToken()

static checkUserEmailToken(id, email_token, config?): Promise<SCUserEmailTokenType>

This endpoint checks an email token.

Parameters

ParameterTypeDescription
idany
email_tokenany
config?AxiosRequestConfig<any>

Returns

Promise<SCUserEmailTokenType>

Source

services/user/index.ts:563


checkUserFollowed()

static checkUserFollowed(id, config?): Promise<SCUserFollowedStatusType>

This endpoint returns is_followed = true if the user (identified in path) is followed by me.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserFollowedStatusType>

Source

services/user/index.ts:379


checkUserFollower()

static checkUserFollower(id, config?): Promise<SCUserFollowerStatusType>

This endpoint returns is_follower = true if the user (identified in path) follow me

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserFollowerStatusType>

Source

services/user/index.ts:388


checkUserHidden()

static checkUserHidden(id, config?): Promise<SCUserHiddenStatusType>

This endpoint returns true if the user (identified in path) is hidden by the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserHiddenStatusType>

Source

services/user/index.ts:513


checkUserHiddenBy()

static checkUserHiddenBy(id, config?): Promise<SCUserHiddenByStatusType>

This endpoint returns true if the user (identified in path) has hidden by the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserHiddenByStatusType>

Source

services/user/index.ts:522


confirmChangeUserMail()

static confirmChangeUserMail(id, new_email, validation_code?, config?): Promise<any>

This endpoint confirms email change.

Parameters

ParameterTypeDescription
idstring | number
new_emailstring
validation_code?string
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:240


createProviderAssociation()

static createProviderAssociation(data, config?): Promise<SCUserProviderAssociationType>

This endpoint creates a provider association for a given account.

Parameters

ParameterTypeDescription
dataSCUserProviderAssociationType
config?AxiosRequestConfig<any>

Returns

Promise<SCUserProviderAssociationType>

Source

services/user/index.ts:622


deleteProviderAssociation()

static deleteProviderAssociation(data, config?): Promise<any>

This endpoint deletes a provider association for a given account.

It requires an administration token.

Parameters

ParameterTypeDescription
dataDeleteProviderAssociation
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:638


followUser()

static followUser(id, config?): Promise<any>

This endpoint allows a user to follow another user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:370


getAllUsers()

static getAllUsers(params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint retrieves the list of all users

Parameters

ParameterTypeDescription
params?any
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/user/index.ts:110


getCurrentUser()

static getCurrentUser(config?): Promise<SCUserType>

This endpoint returns the user identified by the authentication token.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise<SCUserType>

Source

services/user/index.ts:294


getCurrentUserAvatar()

static getCurrentUserAvatar(config?): Promise<SCUserAvatarType>

This endpoint returns the url to the user's current avatar.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise<SCUserAvatarType>

Source

services/user/index.ts:302


getCurrentUserPermission()

static getCurrentUserPermission(config?): Promise<SCUserPermissionType>

This endpoint returns a list of permissions for the user identified by the authentication token. Some permissions in the list depend on global community settings.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise<SCUserPermissionType>

Source

services/user/index.ts:310


getCurrentUserPlatform()

static getCurrentUserPlatform(next?, config?): Promise<SCPlatformType>

This endpoint retrieves the platform url starting from the Authorization user token. Using this url, the logged user (must be a staff member) can access the platform to manage the community.

Parameters

ParameterTypeDescription
next?string
config?AxiosRequestConfig<any>

Returns

Promise<SCPlatformType>

Source

services/user/index.ts:319


getHiddenUsers()

static getHiddenUsers(params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint retrieves the list of all users hidden by the authenticated user

Parameters

ParameterTypeDescription
params?any
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/user/index.ts:120


getHiddenUsersId()

static getHiddenUsersId(params?, config?): Promise<number[]>

This endpoint retrieves the list of all users hidden id by the authenticated user

Parameters

ParameterTypeDescription
params?any
config?AxiosRequestConfig<any>

Returns

Promise<number[]>

Source

services/user/index.ts:130


getProviderAssociations()

static getProviderAssociations(userId, config?): Promise<SCUserProviderAssociationType[]>

This endpoint retrieve all provider associations owned by a user

Parameters

ParameterTypeDescription
userIdstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserProviderAssociationType[]>

Source

services/user/index.ts:609


getSpecificUser()

static getSpecificUser(id, config?): Promise<SCUserType>

This endpoint retrieves a specific user's profile identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserType>

Source

services/user/index.ts:161


getUserAvatars()

static getUserAvatars(config?): Promise <SCPaginatedResponse<SCAvatarType>>

This endpoint retrieves all user avatars.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCAvatarType>>

Source

services/user/index.ts:581


getUserConnectionRequests()

static getUserConnectionRequests(params?, config?): Promise <SCPaginatedResponse<SCUserConnectionRequestType>>

This endpoint retrieves the list of connection requests received by a specific user identified by ID.

Parameters

ParameterTypeDescription
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserConnectionRequestType>>

Source

services/user/index.ts:416


getUserConnectionStatuses()

static getUserConnectionStatuses(users, config?): Promise<any>

This endpoint lists the connection/follow statuses of the logged user starting from a users array.

Parameters

ParameterTypeDescription
usersnumber[]
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:540


getUserConnections()

static getUserConnections(id, params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint retrieves the list of connections of a specific user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
params?UserGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/user/index.ts:398


getUserCounters()

static getUserCounters(id, config?): Promise<SCUserCounterType>

This endpoint retrieves the counters of a specific user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserCounterType>

Source

services/user/index.ts:170


getUserFeed()

static getUserFeed(id, params?, config?): Promise <SCPaginatedResponse<SCFeedUnitType>>

This endpoint retrieves the list of posts of the user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCFeedUnitType>>

Source

services/user/index.ts:341


getUserFollowedCategories()

static getUserFollowedCategories(id, mutual?, config?): Promise<SCCategoryType[]>

This endpoint gets the list of categories followed by the user.

Parameters

ParameterTypeDescription
idstring | number
mutual?number
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryType[]>

Source

services/user/index.ts:330


getUserFollowers()

static getUserFollowers(id, params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint retrieves the list of followers of a specific user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
params?UserGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/user/index.ts:351


getUserFollowings()

static getUserFollowings(id, params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint retrieves the list of following of a specific user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
params?UserGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/user/index.ts:361


getUserLoyaltyPoints()

static getUserLoyaltyPoints(id, config?): Promise<SCUserLoyaltyPointsType>

This endpoint returns user's loyalty points.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserLoyaltyPointsType>

Source

services/user/index.ts:531


getUserRequestConnectionsSent()

static getUserRequestConnectionsSent(params?, config?): Promise <SCPaginatedResponse<SCUserConnectionRequestType>>

This endpoint retrieves a specific user's list of connection requests sent by user.

Parameters

ParameterTypeDescription
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserConnectionRequestType>>

Source

services/user/index.ts:425


removeUserAvatar()

static removeUserAvatar(avatar_id, config?): Promise<any>

This endpoint removes/deletes an avatar from the authenticated user avatars.

Parameters

ParameterTypeDescription
avatar_idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:590


setUserPrimaryAvatar()

static setUserPrimaryAvatar(avatar_id, config?): Promise<any>

This endpoint sets the primary avatar for the authenticated user.

Parameters

ParameterTypeDescription
avatar_idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:599


showHideUser()

static showHideUser(id, config?): Promise<any>

This endpoint shows/hides a user (and its posts) identified by ID. for the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:504


userAcceptRequestConnection()

static userAcceptRequestConnection(id, config?): Promise<any>

This endpoint accepts a request connection of the user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:437


userAutocomplete()

static userAutocomplete(params, config?): Promise <SCPaginatedResponse<SCUserAutocompleteType>>

This endpoint retrieves the list of all users that meet the search criteria. The user object returned will contain only the following attributes: id, username, real_name, ext_id and avatar. This endpoint is recommended for implementing an autocomplete input field.

Parameters

ParameterTypeDescription
paramsUserAutocompleteParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserAutocompleteType>>

Source

services/user/index.ts:141


userCancelRejectConnectionRequest()

static userCancelRejectConnectionRequest(id, config?): Promise<any>

This endpoint cancels reject connection to a user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:464


userCancelRequestConnection()

static userCancelRequestConnection(id, config?): Promise<any>

This endpoint cancels a request connection for a user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:477


userDelete()

static userDelete(id, hard?, config?): Promise<any>

This endpoint deletes a specific user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
hard?number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:201


userMarkSeenConnectionRequest()

static userMarkSeenConnectionRequest(id, config?): Promise<any>

This endpoint marks seen a connection request of user identified by ID. for the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:495


userPatch()

static userPatch(id, data?, config?): Promise<SCUserType>

This endpoint patches a specific user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
data?SCUserType
config?AxiosRequestConfig<any>

Returns

Promise<SCUserType>

Source

services/user/index.ts:191


userRejectConnectionRequest()

static userRejectConnectionRequest(id, config?): Promise<any>

This endpoint rejects a connection request sent from user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:486


userRemoveConnection()

static userRemoveConnection(id, config?): Promise<any>

This endpoint removes connection with the user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:455


userRequestConnection()

static userRequestConnection(id, config?): Promise<any>

This endpoint requests a connection to the user identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/user/index.ts:446


userSearch()

static userSearch(params, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint performs users search.

Parameters

ParameterTypeDescription
paramsUserSearchParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/user/index.ts:151


userSettings()

static userSettings(id, config?): Promise<SCUserSettingsType>

This endpoint retrieves all current user's settings for the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCUserSettingsType>

Source

services/user/index.ts:276


userSettingsPatch()

static userSettingsPatch(id, data?, config?): Promise<SCUserSettingsType>

This endpoint changes the user settings for the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
data?SCUserSettingsType
config?AxiosRequestConfig<any>

Returns

Promise<SCUserSettingsType>

Source

services/user/index.ts:286


userTagToAddressContribution()

static userTagToAddressContribution(config?): Promise<SCTagType>

This endpoint returns user's tags to address a contribution.

Parameters

ParameterTypeDescription
config?AxiosRequestConfig<any>

Returns

Promise<SCTagType>

Source

services/user/index.ts:553


userUpdate()

static userUpdate(id, data?, config?): Promise<SCUserType>

This endpoint updates the profile of a user identified by ID. A user can only update their personal data. If the request is willing to update the avatar or the cover the 'Content-Type' request header must be set as 'multipart/form-data', otherwise it can be 'application/x-www-form-urlencoded'.

Parameters

ParameterTypeDescription
idstring | number
data?SCUserType
config?AxiosRequestConfig<any>

Returns

Promise<SCUserType>

Source

services/user/index.ts:181