CategoryApiClient
Contains all the endpoints needed to manage categories.
Constructors
Constructor
new CategoryApiClient():
CategoryApiClient
Returns
CategoryApiClient
Methods
checkCategoryIsFollowed()
staticcheckCategoryIsFollowed(id,config?):Promise<SCCategoryFollowedStatusType>
This endpoint returns is_followed = true if the category (identified in path) is followed by the authenticated user.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<SCCategoryFollowedStatusType>
createCategory()
staticcreateCategory(data,config?):Promise<SCCategoryType>
This endpoint creates a category.
Parameters
| Parameter | Type | Description |
|---|---|---|
data | SCCategoryType | |
config? | AxiosRequestConfig |
Returns
Promise<SCCategoryType>
deleteASpecificCategory()
staticdeleteASpecificCategory(id,config?):Promise<any>
This endpoint deletes a specific category identified by ID.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<any>
followCategory()
staticfollowCategory(id,config?):Promise<any>
This endpoint follows a category.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<any>
getAllCategories()
staticgetAllCategories(params?,config?):Promise<SCPaginatedResponse<SCCategoryType>>
This endpoint retrieves all categories.
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | CategoryParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCCategoryType>>
getCategoryAudience()
staticgetCategoryAudience(id,config?):Promise<SCCategoryAudienceType>
This endpoint returns the audience of a specific category.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<SCCategoryAudienceType>
getCategoryFeed()
staticgetCategoryFeed(id,params?,config?):Promise<SCPaginatedResponse<SCFeedUnitType>>
This endpoint retrieves the category feed.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCFeedUnitType>>
getCategoryFollowers()
staticgetCategoryFollowers(id,params?,config?):Promise<SCPaginatedResponse<SCUserType>>
This endpoint returns all followers of a specific category.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCUserType>>
getCategoryTrendingFeed()
staticgetCategoryTrendingFeed(id,params?,config?):Promise<SCPaginatedResponse<SCFeedUnitType>>
This endpoint retrieves the category trending feed.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCFeedUnitType>>
getCategoryTrendingFollowers()
staticgetCategoryTrendingFollowers(id,params?,config?):Promise<SCPaginatedResponse<SCUserType>>
This endpoint returns all trending followers of a specific category during last n days (default 90) .
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCUserType>>
getFollowedCategories()
staticgetFollowedCategories(params?,config?):Promise<SCPaginatedResponse<SCCategoryType>>
This endpoint retrieves all followed categories by the user.
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | CategoryParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCCategoryType>>
getPopularCategories()
staticgetPopularCategories(params?,config?):Promise<SCPaginatedResponse<SCCategoryType>>
This endpoint retrieves all categories ordered by the number of followers (in descending order).
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | BaseGetParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCCategoryType>>
getSpecificCategory()
staticgetSpecificCategory(id,config?):Promise<SCCategoryType>
This endpoint retrieves a specific category.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
config? | AxiosRequestConfig |
Returns
Promise<SCCategoryType>
patchASpecificCategory()
staticpatchASpecificCategory(id,data,config?):Promise<SCCategoryType>
This endpoint patches a specific category.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
data | SCCategoryType | |
config? | AxiosRequestConfig |
Returns
Promise<SCCategoryType>
searchCategory()
staticsearchCategory(params?,config?):Promise<SCPaginatedResponse<SCCategoryType>>
This endpoint performs category search.
Parameters
| Parameter | Type | Description |
|---|---|---|
params? | CategoryParams | |
config? | AxiosRequestConfig |
Returns
Promise<SCPaginatedResponse<SCCategoryType>>
updateASpecificCategory()
staticupdateASpecificCategory(id,data,config?):Promise<SCCategoryType>
This endpoint updates a specific category.
Parameters
| Parameter | Type | Description |
|---|---|---|
id | string | number | |
data | SCCategoryType | |
config? | AxiosRequestConfig |
Returns
Promise<SCCategoryType>