Class: FeedApiClient
services/feed.FeedApiClient
Contains all the endpoints needed to manage feed.
Constructors
constructor
• new FeedApiClient(): FeedApiClient
Returns
Methods
getExploreFeed
▸ 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
Name | Type |
---|---|
params? | FeedParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Defined in
getMainFeed
▸ getMainFeed(params?
, config?
): Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
This endpoint retrieves the main (home) feed.
Parameters
Name | Type |
---|---|
params? | FeedParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Defined in
getMainFeedUnseenCount
▸ getMainFeedUnseenCount(config?
): Promise
<SCFeedUnseenCountType
>
This endpoint retrieves Main Feed unseen count.
Parameters
Name | Type |
---|---|
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCFeedUnseenCountType
>
Defined in
likeFeedObjs
▸ likeFeedObjs(object
, config?
): Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
This endpoint retrieves a list of Feed objects similar to the id of passed objects
Parameters
Name | Type |
---|---|
object | number [] |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Defined in
markReadASpecificFeedObj
▸ 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
Name | Type |
---|---|
object | number [] |
config? | AxiosRequestConfig <any > |
Returns
Promise
<any
>