Skip to main content

Class: FeedObjectApiClient

services/feed_object.FeedObjectApiClient

Contains all the endpoints needed to manage feed objs (discussions-posts-statuses).

Constructors

constructor

new FeedObjectApiClient(): FeedObjectApiClient

Returns

FeedObjectApiClient

Methods

checkIfFollowingFeedObject

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

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCFeedObjectFollowingStatusType>

Defined in

services/feed_object/index.ts:462


checkIfSuspendedFeedObject

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

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCFeedObjectSuspendedStatusType>

Defined in

services/feed_object/index.ts:494


createFeedObject

createFeedObject(type, data, config?): Promise<SCFeedObjectType>

This endpoint creates a feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
dataFeedObjCreateParams
config?AxiosRequestConfig<any>

Returns

Promise<SCFeedObjectType>

Defined in

services/feed_object/index.ts:206


deleteFeedObject

deleteFeedObject(type, id, config?): Promise<any>

This endpoint deletes a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:250


feedObjectContributorsList

feedObjectContributorsList(type, id, params?, config?): Promise<SCPaginatedResponse<SCUserType>>

This endpoint retrieves all contributors for a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCUserType>>

Defined in

services/feed_object/index.ts:265


feedObjectFlagList

feedObjectFlagList(type, id, config?): Promise<SCPaginatedResponse<SCFlagType>>

This endpoint retrieves a list of flags for a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFlagType>>

Defined in

services/feed_object/index.ts:561


feedObjectFlagStatus

feedObjectFlagStatus(type, id, config?): Promise<SCPaginatedResponse<SCFlagType>>

Retrieves, if exists, a flag for this contribute created by the authenticated user

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFlagType>>

Defined in

services/feed_object/index.ts:547


feedObjectFollowingList

feedObjectFollowingList(type, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint retrieves all feed objs followed by the authenticated user

Parameters

NameType
typeDISCUSSION | POST | STATUS
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:443


feedObjectHideStatus

feedObjectHideStatus(type, id, config?): Promise<SCFeedObjectHideStatusType>

This endpoint retrieves if the feed obj has been hidden by the authenticated user (hidden = true)

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCFeedObjectHideStatusType>

Defined in

services/feed_object/index.ts:589


feedObjectPollVote

feedObjectPollVote(type, id, choice, config?): Promise<any>

This endpoint upvotes a specific poll choice in a feed obj

Parameters

NameTypeDescription
typeDISCUSSION | POST | STATUSIt can be only "discussion" or "post".
idstring | number
choicenumber
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:397


feedObjectPollVotesList

feedObjectPollVotesList(type, id, params?, config?): Promise<SCPaginatedResponse<SCPollVoteType>>

This endpoint retrieves all poll votes for a specific feed obj

Parameters

NameTypeDescription
typeDISCUSSION | POST | STATUSIt can be only "discussion" or "post".
idstring | number
params?FeedObjectPollVotesSearch
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCPollVoteType>>

Defined in

services/feed_object/index.ts:413


feedObjectSharesList

feedObjectSharesList(type, id, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint retrieves all shares for a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:286


feedObjectSuspendedList

feedObjectSuspendedList(type, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint retrieves the list of feed obj which notifications are suspended by the authenticated user

Parameters

NameType
typeDISCUSSION | POST | STATUS
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:512


feedObjectUserSharesList

feedObjectUserSharesList(type, id, params?, config?): Promise<SCPaginatedResponse<SCUserType>>

This endpoint retrieves all shares users for a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCUserType>>

Defined in

services/feed_object/index.ts:307


feedObjectVotes

feedObjectVotes(type, id, params?, config?): Promise<SCPaginatedResponse<SCVoteType>>

This endpoint retrieves all votes for a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCVoteType>>

Defined in

services/feed_object/index.ts:380


flagFeedObject

flagFeedObject(type, id, flag_type, config?): Promise<any>

This endpoint flags a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
flag_typeSCFlagTypeEnum
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:532


followFeedObject

followFeedObject(type, id, config?): Promise<any>

This endpoint follows a feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:429


getAllFeedObjects

getAllFeedObjects(type, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint retrieves all feed objs

Parameters

NameType
typeDISCUSSION | POST | STATUS
params?FeedObjGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:157


getSpecificFeedObject

getSpecificFeedObject(type, id, config?): Promise<SCFeedObjectType>

This endpoint retrieves a specific feed obj using ID

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCFeedObjectType>

Defined in

services/feed_object/index.ts:220


getUncommentedFeedObjects

getUncommentedFeedObjects(type, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint retrieves all uncommented feed objs

Parameters

NameType
typeDISCUSSION | POST | STATUS
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:172


hideFeedObject

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

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:575


relatedFeedObjects

relatedFeedObjects(type, id, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint restores a feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:342


restoreFeedObject

restoreFeedObject(type, id, config?): Promise<any>

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:327


searchFeedObject

searchFeedObject(type, params?, config?): Promise<SCPaginatedResponse<SCFeedObjectType>>

This endpoint performs search operation to feed objs

Parameters

NameType
typeDISCUSSION | POST | STATUS
params?BaseSearchParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCFeedObjectType>>

Defined in

services/feed_object/index.ts:191


suspendFeedObject

suspendFeedObject(type, id, config?): Promise<any>

This endpoint suspends the notifications for the selected feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:476


updateFeedObject

updateFeedObject(type, id, data, config?): Promise<SCFeedObjectType>

This endpoint updates a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
dataFeedObjCreateParams
config?AxiosRequestConfig<any>

Returns

Promise<SCFeedObjectType>

Defined in

services/feed_object/index.ts:235


voteFeedObject

voteFeedObject(type, id, reaction?, config?): Promise<any>

This endpoint upvotes a specific feed obj

Parameters

NameType
typeDISCUSSION | POST | STATUS
idstring | number
reaction?number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Defined in

services/feed_object/index.ts:363