GroupApiClient
Contains all the endpoints needed to manage groups.
Constructors
new GroupApiClient()
new GroupApiClient():
GroupApiClient
Returns
Methods
changeGroupAvatarOrCover()
static
changeGroupAvatarOrCover(id
,data
,config
?):Promise
<SCGroupType
>
This endpoint changes the group avatar
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | FormData | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCGroupType
>
Source
createGroup()
static
createGroup(data
,config
?):Promise
<SCGroupType
>
This endpoint creates a group.
Parameters
Parameter | Type | Description |
---|---|---|
data | GroupCreateParams | FormData | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCGroupType
>
Source
getGroupFeed()
static
getGroupFeed(id
,params
?,config
?):Promise
<any
>
This endpoint performs groups search
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params ? | GroupFeedParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
getGroupInvitedUsers()
static
getGroupInvitedUsers(id
,params
?,config
?):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of invited users.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params ? | BaseGetParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Source
getGroupMembers()
static
getGroupMembers(id
,params
?,config
?):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns all subscribers of a specific group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params ? | BaseGetParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Source
getGroupSubscriptionStatus()
static
getGroupSubscriptionStatus(id
,config
?):Promise
<any
>
This endpoint retrieves the group subscription status.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
getGroupSuggestedUsers()
static
getGroupSuggestedUsers(id
,search
,config
?):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of suggested users to invite to the group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
search | string | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Source
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
Parameter | Type | Description |
---|---|---|
id | string | number | |
params ? | BaseGetParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Source
getGroupsSuggestedUsers()
static
getGroupsSuggestedUsers(search
,config
?):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns a list of suggested users to invite to the groups.
Parameters
Parameter | Type | Description |
---|---|---|
search | string | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Source
getSpecificGroupInfo()
static
getSpecificGroupInfo(id
,config
?):Promise
<SCGroupType
>
This endpoint retrieves a specific group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCGroupType
>
Source
getUserGroups()
static
getUserGroups(params
?,config
?):Promise
<SCPaginatedResponse
<SCGroupType
>>
This endpoint retrieves all the groups of the logged-in user.
Parameters
Parameter | Type | Description |
---|---|---|
params ? | BaseSearchParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCGroupType
>>
Source
getUserSubscribedGroups()
static
getUserSubscribedGroups(id
,params
?,config
?):Promise
<SCPaginatedResponse
<SCGroupType
>>
This endpoint retrieves a specific user groups.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
params ? | BaseSearchParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCGroupType
>>
Source
inviteOrAcceptGroupRequest()
static
inviteOrAcceptGroupRequest(id
,data
,config
?):Promise
<any
>
This endpoint allows to invite or accept a group invite.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | object | |
data.users | number [] | - |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
patchGroup()
static
patchGroup(id
,data
,config
?):Promise
<SCGroupType
>
This endpoint patches a group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | SCGroupType | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCGroupType
>
Source
removeUserFromGroup()
static
removeUserFromGroup(id
,user
,config
?):Promise
<any
>
This endpoint removes the user specified from the group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
user | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
searchGroups()
static
searchGroups(params
?,config
?):Promise
<SCPaginatedResponse
<SCGroupType
>>
This endpoint performs groups search
Parameters
Parameter | Type | Description |
---|---|---|
params ? | BaseSearchParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCGroupType
>>
Source
subscribeToGroup()
static
subscribeToGroup(id
,config
?):Promise
<any
>
This endpoint subscribes to a group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
unsubscribeFromGroup()
static
unsubscribeFromGroup(id
,config
?):Promise
<any
>
This endpoint unsubscribes from a group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Source
updateGroup()
static
updateGroup(id
,data
,config
?):Promise
<SCGroupType
>
This endpoint updates a group.
Parameters
Parameter | Type | Description |
---|---|---|
id | string | number | |
data | SCGroupType | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCGroupType
>