FeedObjectApiClient
Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).
Constructors
Constructor
new FeedObjectApiClient():
FeedObjectApiClient
Returns
FeedObjectApiClient
Methods
checkIfFollowingFeedObject()
static
checkIfFollowingFeedObject(type
,id
,config?
):Promise
<SCFeedObjectFollowingStatusType
>
This endpoint returns following = true if the feed obj (identified in path) is followed by the authenticated user
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCFeedObjectFollowingStatusType
>
checkIfSuspendedFeedObject()
static
checkIfSuspendedFeedObject(type
,id
,config?
):Promise
<SCFeedObjectSuspendedStatusType
>
This endpoint returns suspended = true if the notifications for the feed obj (identified in path) is suspended by the authenticated user
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCFeedObjectSuspendedStatusType
>
createFeedObject()
static
createFeedObject(type
,data
,config?
):Promise
<SCFeedObjectType
>
This endpoint creates a feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
data | FeedObjCreateParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCFeedObjectType
>
deleteFeedObject()
static
deleteFeedObject(type
,id
,config?
):Promise
<any
>
This endpoint deletes a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
feedObjectContributorsList()
static
feedObjectContributorsList(type
,id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint retrieves all contributors for a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
feedObjectFlagList()
static
feedObjectFlagList(type
,id
,config?
):Promise
<SCPaginatedResponse
<SCFlagType
>>
This endpoint retrieves a list of flags for a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFlagType
>>
feedObjectFlagStatus()
static
feedObjectFlagStatus(type
,id
,config?
):Promise
<SCPaginatedResponse
<SCFlagType
>>
Retrieves, if exists, a flag for this contribute created by the authenticated user
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFlagType
>>
feedObjectFollowingList()
static
feedObjectFollowingList(type
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint retrieves all feed objs followed by the authenticated user
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
feedObjectHideStatus()
static
feedObjectHideStatus(type
,id
,config?
):Promise
<SCFeedObjectHideStatusType
>
This endpoint retrieves if the feed obj has been hidden by the authenticated user (hidden = true)
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCFeedObjectHideStatusType
>
feedObjectPollVote()
static
feedObjectPollVote(type
,id
,choice
,config?
):Promise
<any
>
This endpoint upvotes a specific poll choice in a feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | It can be only "discussion" or "post". |
id | string | number | |
choice | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
feedObjectPollVotesList()
static
feedObjectPollVotesList(type
,id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCPollVoteType
>>
This endpoint retrieves all poll votes for a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | It can be only "discussion" or "post". |
id | string | number | |
params? | FeedObjectPollVotesSearch | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCPollVoteType
>>
feedObjectSharesList()
static
feedObjectSharesList(type
,id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint retrieves all shares for a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
feedObjectSuspendedList()
static
feedObjectSuspendedList(type
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint retrieves the list of feed obj which notifications are suspended by the authenticated user
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
feedObjectUserSharesList()
static
feedObjectUserSharesList(type
,id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint retrieves all shares users for a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
feedObjectVotes()
static
feedObjectVotes(type
,id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCVoteType
>>
This endpoint retrieves all votes for a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCVoteType
>>
flagFeedObject()
static
flagFeedObject(type
,id
,flag_type
,config?
):Promise
<any
>
This endpoint flags a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
flag_type | SCFlagTypeEnum | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
followFeedObject()
static
followFeedObject(type
,id
,config?
):Promise
<any
>
This endpoint follows a feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
getAllFeedObjects()
static
getAllFeedObjects(type
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint retrieves all feed objs
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | FeedObjGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
getSpecificFeedObject()
static
getSpecificFeedObject(type
,id
,config?
):Promise
<SCFeedObjectType
>
This endpoint retrieves a specific feed obj using ID
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<SCFeedObjectType
>
getUncommentedFeedObjects()
static
getUncommentedFeedObjects(type
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint retrieves all uncommented feed objs
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
hideFeedObject()
static
hideFeedObject(type
,id
,config?
):Promise
<any
>
This endpoint hides the feed obj for the logged user. The feed obj must be in show state
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
relatedFeedObjects()
static
relatedFeedObjects(type
,id
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint restores a feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
restoreFeedObject()
static
restoreFeedObject(type
,id
,config?
):Promise
<any
>
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
searchFeedObject()
static
searchFeedObject(type
,params?
,config?
):Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
This endpoint performs search operation to feed objs
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | BaseSearchParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCPaginatedResponse
<SCFeedObjectType
>>
suspendFeedObject()
static
suspendFeedObject(type
,id
,config?
):Promise
<any
>
This endpoint suspends the notifications for the selected feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>
updateFeedObject()
static
updateFeedObject(type
,id
,data
,config?
):Promise
<SCFeedObjectType
>
This endpoint updates a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
data | FeedObjCreateParams | |
config? | AxiosRequestConfig |
Returns
Promise
<SCFeedObjectType
>
voteFeedObject()
static
voteFeedObject(type
,id
,reaction?
,config?
):Promise
<any
>
This endpoint upvotes a specific feed obj
Parameters
Parameter | Type | Description |
---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
reaction? | number | |
config? | AxiosRequestConfig |
Returns
Promise
<any
>