Skip to main content

FeedObjectService

Feed Object service can be used in the following way:
1. Import the service from our library:

import {FeedObjectService} from "@selfcommunity/api-services";
2. Create a function and put the service inside it!
The async function `getAllFeedObjects` will return the paginated list of feed objs.

async getAllFeedObjects(type) {
return await FeedObjectService.getAllFeedObjects(type);
}
If you need to customize the request, you can add optional config params (`AxiosRequestConfig` type).

1. Declare it(or declare them, it is possible to add multiple params)

const headers = headers: {Authorization: `Bearer ${yourToken}`}

2. Add it inside the brackets and pass it to the function, as shown in the previous example!

Constructors

new FeedObjectService()

new FeedObjectService(): FeedObjectService

Returns

FeedObjectService

Methods

checkIfFollowingFeedObject()

static checkIfFollowingFeedObject(type, id, config?): Promise<SCFeedObjectFollowingStatusType>

Parameters

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

Returns

Promise<SCFeedObjectFollowingStatusType>

Source

services/feed_object/index.ts:777


checkIfSuspendedFeedObject()

static checkIfSuspendedFeedObject(type, id, config?): Promise<SCFeedObjectSuspendedStatusType>

Parameters

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

Returns

Promise<SCFeedObjectSuspendedStatusType>

Source

services/feed_object/index.ts:793


createFeedObject()

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

Parameters

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

Returns

Promise<SCFeedObjectType>

Source

services/feed_object/index.ts:651


deleteFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:676


feedObjectContributorsList()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/feed_object/index.ts:684


feedObjectFlagList()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFlagType>>

Source

services/feed_object/index.ts:817


feedObjectFlagStatus()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFlagType>>

Source

services/feed_object/index.ts:825


feedObjectFollowingList()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:769


feedObjectHideStatus()

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

Parameters

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

Returns

Promise<SCFeedObjectHideStatusType>

Source

services/feed_object/index.ts:840


feedObjectPollVote()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:743


feedObjectPollVotesList()

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

Parameters

ParameterType
typeDISCUSSION | POST | STATUS
idstring | number
params?FeedObjectPollVotesSearch
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCPollVoteType>>

Source

services/feed_object/index.ts:752


feedObjectSharesList()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:693


feedObjectSuspendedList()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:800


feedObjectUserSharesList()

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

Parameters

ParameterType
typeDISCUSSION | POST | STATUS
idstring | number
params?BaseGetParams

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/feed_object/index.ts:702


feedObjectVotes()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCVoteType>>

Source

services/feed_object/index.ts:735


flagFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:808


followFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:761


getAllFeedObjects()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:627


getSpecificFeedObject()

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

Parameters

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

Returns

Promise<SCFeedObjectType>

Source

services/feed_object/index.ts:659


getUncommentedFeedObjects()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:635


hideFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:832


relatedFeedObjects()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:718


restoreFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:710


searchFeedObject()

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

Parameters

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

Returns

Promise <SCPaginatedResponse<SCFeedObjectType>>

Source

services/feed_object/index.ts:643


suspendFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:785


updateFeedObject()

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

Parameters

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

Returns

Promise<SCFeedObjectType>

Source

services/feed_object/index.ts:667


voteFeedObject()

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

Parameters

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

Returns

Promise<any>

Source

services/feed_object/index.ts:727