FeedObjectApiClient
Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).
Constructors
Constructor
new FeedObjectApiClient():
FeedObjectApiClient
Returns
FeedObjectApiClient
Methods
checkIfFollowingFeedObject()
staticcheckIfFollowingFeedObject(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()
staticcheckIfSuspendedFeedObject(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()
staticcreateFeedObject(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()
staticdeleteFeedObject(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()
staticfeedObjectContributorsList(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>>
feedObjectDraftedList()
staticfeedObjectDraftedList(type,params?,config?):Promise<SCPaginatedResponse<SCFeedObjectType>>
This endpoint retrieves the list of drafted feed objects
Parameters
| Parameter | Type | Description |
|---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCFeedObjectType>>
feedObjectFlagList()
staticfeedObjectFlagList(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()
staticfeedObjectFlagStatus(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()
staticfeedObjectFollowingList(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()
staticfeedObjectHideStatus(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()
staticfeedObjectPollVote(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()
staticfeedObjectPollVotesList(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>>
feedObjectScheduledList()
staticfeedObjectScheduledList(type,params?,config?):Promise<SCPaginatedResponse<SCFeedObjectType>>
This endpoint retrieves the list of scheduled feed objects
Parameters
| Parameter | Type | Description |
|---|---|---|
type | DISCUSSION | POST | STATUS | |
params? | ScheduledFeedObjParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCFeedObjectType>>
feedObjectSharesList()
staticfeedObjectSharesList(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()
staticfeedObjectSuspendedList(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()
staticfeedObjectUserSharesList(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()
staticfeedObjectVotes(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()
staticflagFeedObject(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()
staticfollowFeedObject(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()
staticgetAllFeedObjects(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()
staticgetSpecificFeedObject(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()
staticgetUncommentedFeedObjects(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()
statichideFeedObject(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>
publishFeedObject()
staticpublishFeedObject(type,id,config?):Promise<SCFeedObjectType>
This endpoint publishes a drafted or scheduled the feed obj.
Parameters
| Parameter | Type | Description |
|---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<SCFeedObjectType>
relatedFeedObjects()
staticrelatedFeedObjects(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()
staticrestoreFeedObject(type,id,config?):Promise<any>
Parameters
| Parameter | Type | Description |
|---|---|---|
type | DISCUSSION | POST | STATUS | |
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<any>
searchFeedObject()
staticsearchFeedObject(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()
staticsuspendFeedObject(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()
staticupdateFeedObject(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()
staticvoteFeedObject(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>