Skip to main content

GroupApiClient

Contains all the endpoints needed to manage groups.

Constructors

new GroupApiClient()

new GroupApiClient(): GroupApiClient

Returns

GroupApiClient

Methods

changeGroupAvatarOrCover()

static changeGroupAvatarOrCover(id, data, config?): Promise<SCGroupType>

This endpoint changes the group avatar

Parameters

ParameterTypeDescription
idstring | number
dataFormData
config?AxiosRequestConfig<any>

Returns

Promise<SCGroupType>

Source

services/group/index.ts:132


createGroup()

static createGroup(data, config?): Promise<SCGroupType>

This endpoint creates a group.

Parameters

ParameterTypeDescription
dataGroupCreateParams | FormData
config?AxiosRequestConfig<any>

Returns

Promise<SCGroupType>

Source

services/group/index.ts:103


getGroupFeed()

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

This endpoint performs groups search

Parameters

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

Returns

Promise<any>

Source

services/group/index.ts:93


getGroupInvitedUsers()

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

This endpoint returns a list of invited users.

Parameters

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

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/group/index.ts:193


getGroupMembers()

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

This endpoint returns all subscribers of a specific group.

Parameters

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

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/group/index.ts:141


getGroupSubscriptionStatus()

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

This endpoint retrieves the group subscription status.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/group/index.ts:235


getGroupSuggestedUsers()

static getGroupSuggestedUsers(id, search, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint returns a list of suggested users to invite to the group.

Parameters

ParameterTypeDescription
idstring | number
searchstring
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/group/index.ts:152


getGroupWaitingApprovalSubscribers()

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

This endpoint returns a list of the users waiting to be added to the group.

Parameters

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

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/group/index.ts:244


getGroupsSuggestedUsers()

static getGroupsSuggestedUsers(search, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint returns a list of suggested users to invite to the groups.

Parameters

ParameterTypeDescription
searchstring
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/group/index.ts:165


getSpecificGroupInfo()

static getSpecificGroupInfo(id, config?): Promise<SCGroupType>

This endpoint retrieves a specific group.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCGroupType>

Source

services/group/index.ts:83


getUserGroups()

static getUserGroups(params?, config?): Promise <SCPaginatedResponse<SCGroupType>>

This endpoint retrieves all the groups of the logged-in user.

Parameters

ParameterTypeDescription
params?BaseSearchParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCGroupType>>

Source

services/group/index.ts:44


getUserSubscribedGroups()

static getUserSubscribedGroups(id, params?, config?): Promise <SCPaginatedResponse<SCGroupType>>

This endpoint retrieves a specific user groups.

Parameters

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

Returns

Promise <SCPaginatedResponse<SCGroupType>>

Source

services/group/index.ts:55


inviteOrAcceptGroupRequest()

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

This endpoint allows to invite or accept a group invite.

Parameters

ParameterTypeDescription
idstring | number
dataobject
data.usersnumber[]-
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/group/index.ts:222


patchGroup()

static patchGroup(id, data, config?): Promise<SCGroupType>

This endpoint patches a group.

Parameters

ParameterTypeDescription
idstring | number
dataSCGroupType
config?AxiosRequestConfig<any>

Returns

Promise<SCGroupType>

Source

services/group/index.ts:123


removeUserFromGroup()

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

This endpoint removes the user specified from the group.

Parameters

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

Returns

Promise<any>

Source

services/group/index.ts:179


searchGroups()

static searchGroups(params?, config?): Promise <SCPaginatedResponse<SCGroupType>>

This endpoint performs groups search

Parameters

ParameterTypeDescription
params?BaseSearchParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCGroupType>>

Source

services/group/index.ts:73


subscribeToGroup()

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

This endpoint subscribes to a group.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/group/index.ts:203


unsubscribeFromGroup()

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

This endpoint unsubscribes from a group.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/group/index.ts:212


updateGroup()

static updateGroup(id, data, config?): Promise<SCGroupType>

This endpoint updates a group.

Parameters

ParameterTypeDescription
idstring | number
dataSCGroupType
config?AxiosRequestConfig<any>

Returns

Promise<SCGroupType>

Source

services/group/index.ts:113