FeedApiClient
Contains all the endpoints needed to manage feed.
Constructors
Constructor
new FeedApiClient():
FeedApiClient
Returns
FeedApiClient
Methods
getExploreFeed()
staticgetExploreFeed(params?,config?):Promise<SCPaginatedResponse<SCFeedUnitType>>
This endpoint retrieves explore feed. This endpoint can be disabled by setting explore_stream_enabled community option to false.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | FeedParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCFeedUnitType>>
getMainFeed()
staticgetMainFeed(params?,config?):Promise<SCPaginatedResponse<SCFeedUnitType>>
This endpoint retrieves the main (home) feed.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| params? | FeedParams | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCFeedUnitType>>
getMainFeedUnseenCount()
staticgetMainFeedUnseenCount(config?):Promise<SCFeedUnseenCountType>
This endpoint retrieves Main Feed unseen count.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| config? | AxiosRequestConfig | 
Returns
Promise<SCFeedUnseenCountType>
likeFeedObjs()
staticlikeFeedObjs(object,config?):Promise<SCPaginatedResponse<SCFeedUnitType>>
This endpoint retrieves a list of Feed objects similar to the id of passed objects
Parameters
| Parameter | Type | Description | 
|---|---|---|
| object | number[] | |
| config? | AxiosRequestConfig | 
Returns
Promise<SCPaginatedResponse<SCFeedUnitType>>
markReadASpecificFeedObj()
staticmarkReadASpecificFeedObj(object,config?):Promise<any>
This endpoint marks as read a list of objects in the feed. Usually it is called when a Feed object enter the viewport of the user.
Parameters
| Parameter | Type | Description | 
|---|---|---|
| object | number[] | |
| config? | AxiosRequestConfig | 
Returns
Promise<any>