Class: CategoryApiClient
services/category.CategoryApiClient
Contains all the endpoints needed to manage categories.
Constructors
constructor
• new CategoryApiClient(): CategoryApiClient
Returns
Methods
checkCategoryIsFollowed
▸ checkCategoryIsFollowed(id
, config?
): Promise
<SCCategoryFollowedStatusType
>
This endpoint returns is_followed = true if the category (identified in path) is followed by the authenticated user.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCCategoryFollowedStatusType
>
Defined in
services/category/index.ts:167
createCategory
▸ createCategory(data
, config?
): Promise
<SCCategoryType
>
This endpoint creates a category.
Parameters
Name | Type |
---|---|
data | SCCategoryType |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCCategoryType
>
Defined in
deleteASpecificCategory
▸ deleteASpecificCategory(id
, config?
): Promise
<any
>
This endpoint deletes a specific category identified by ID.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Defined in
followCategory
▸ followCategory(id
, config?
): Promise
<any
>
This endpoint follows a category.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<any
>
Defined in
services/category/index.ts:158
getAllCategories
▸ getAllCategories(params?
, config?
): Promise
<SCPaginatedResponse
<SCCategoryType
>>
This endpoint retrieves all categories.
Parameters
Name | Type |
---|---|
params? | CategoryParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCCategoryType
>>
Defined in
getCategoryAudience
▸ getCategoryAudience(id
, config?
): Promise
<SCCategoryAudienceType
>
This endpoint returns the audience of a specific category.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCCategoryAudienceType
>
Defined in
services/category/index.ts:103
getCategoryFeed
▸ getCategoryFeed(id
, params?
, config?
): Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
This endpoint retrieves the category feed.
Parameters
Name | Type |
---|---|
id | string | number |
params? | BaseGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Defined in
services/category/index.ts:121
getCategoryFollowers
▸ getCategoryFollowers(id
, params?
, config?
): Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns all followers of a specific category.
Parameters
Name | Type |
---|---|
id | string | number |
params? | BaseGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Defined in
services/category/index.ts:112
getCategoryTrendingFeed
▸ getCategoryTrendingFeed(id
, params?
, config?
): Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
This endpoint retrieves the category trending feed.
Parameters
Name | Type |
---|---|
id | string | number |
params? | BaseGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCFeedUnitType
>>
Defined in
services/category/index.ts:131
getCategoryTrendingFollowers
▸ getCategoryTrendingFollowers(id
, params?
, config?
): Promise
<SCPaginatedResponse
<SCUserType
>>
This endpoint returns all trending followers of a specific category during last n days (default 90) .
Parameters
Name | Type |
---|---|
id | string | number |
params? | BaseGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCUserType
>>
Defined in
services/category/index.ts:145
getFollowedCategories
▸ getFollowedCategories(params?
, config?
): Promise
<SCPaginatedResponse
<SCCategoryType
>>
This endpoint retrieves all followed categories by the user.
Parameters
Name | Type |
---|---|
params? | CategoryParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCCategoryType
>>
Defined in
services/category/index.ts:176
getPopularCategories
▸ getPopularCategories(params?
, config?
): Promise
<SCPaginatedResponse
<SCCategoryType
>>
This endpoint retrieves all categories ordered by the number of followers (in descending order).
Parameters
Name | Type |
---|---|
params? | BaseGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCCategoryType
>>
Defined in
services/category/index.ts:186
getSpecificCategory
▸ getSpecificCategory(id
, config?
): Promise
<SCCategoryType
>
This endpoint retrieves a specific category.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCCategoryType
>
Defined in
patchASpecificCategory
▸ patchASpecificCategory(id
, data
, config?
): Promise
<SCCategoryType
>
This endpoint patches a specific category.
Parameters
Name | Type |
---|---|
id | string | number |
data | SCCategoryType |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCCategoryType
>
Defined in
searchCategory
▸ searchCategory(params?
, config?
): Promise
<SCPaginatedResponse
<SCCategoryType
>>
This endpoint performs category search.
Parameters
Name | Type |
---|---|
params? | CategoryParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCCategoryType
>>
Defined in
updateASpecificCategory
▸ updateASpecificCategory(id
, data
, config?
): Promise
<SCCategoryType
>
This endpoint updates a specific category.
Parameters
Name | Type |
---|---|
id | string | number |
data | SCCategoryType |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCCategoryType
>