FeedApiClient
Contains all the endpoints needed to manage feed.
Constructors
new FeedApiClient()
new FeedApiClient():
FeedApiClient
Returns
Methods
getExploreFeed()
static
getExploreFeed(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 <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Source
getMainFeed()
static
getMainFeed(params
?,config
?):Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
This endpoint retrieves the main (home) feed.
Parameters
Parameter | Type | Description |
---|---|---|
params ? | FeedParams | |
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Source
getMainFeedUnseenCount()
static
getMainFeedUnseenCount(config
?):Promise
<SCFeedUnseenCountType
>
This endpoint retrieves Main Feed unseen count.
Parameters
Parameter | Type | Description |
---|---|---|
config ? | AxiosRequestConfig <any > |
Returns
Promise
<SCFeedUnseenCountType
>
Source
likeFeedObjs()
static
likeFeedObjs(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 <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Source
markReadASpecificFeedObj()
static
markReadASpecificFeedObj(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 <any > |
Returns
Promise
<any
>