Skip to main content

CategoryApiClient

Contains all the endpoints needed to manage categories.

Constructors

new CategoryApiClient()

new CategoryApiClient(): CategoryApiClient

Returns

CategoryApiClient

Methods

checkCategoryIsFollowed()

static checkCategoryIsFollowed(id, config?): Promise<SCCategoryFollowedStatusType>

This endpoint returns is_followed = true if the category (identified in path) is followed by the authenticated user.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryFollowedStatusType>

Source

services/category/index.ts:166


createCategory()

static createCategory(data, config?): Promise<SCCategoryType>

This endpoint creates a category.

Parameters

ParameterTypeDescription
dataSCCategoryType
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryType>

Source

services/category/index.ts:53


deleteASpecificCategory()

static deleteASpecificCategory(id, config?): Promise<any>

This endpoint deletes a specific category identified by ID.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/category/index.ts:91


followCategory()

static followCategory(id, config?): Promise<any>

This endpoint follows a category.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<any>

Source

services/category/index.ts:157


getAllCategories()

static getAllCategories(params?, config?): Promise <SCPaginatedResponse<SCCategoryType>>

This endpoint retrieves all categories.

Parameters

ParameterTypeDescription
params?CategoryParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCCategoryType>>

Source

services/category/index.ts:35


getCategoryAudience()

static getCategoryAudience(id, config?): Promise<SCCategoryAudienceType>

This endpoint returns the audience of a specific category.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryAudienceType>

Source

services/category/index.ts:100


getCategoryFeed()

static getCategoryFeed(id, params?, config?): Promise <SCPaginatedResponse<SCFeedUnitType>>

This endpoint retrieves the category feed.

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCFeedUnitType>>

Source

services/category/index.ts:120


getCategoryFollowers()

static getCategoryFollowers(id, params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint returns all followers of a specific category.

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/category/index.ts:110


getCategoryTrendingFeed()

static getCategoryTrendingFeed(id, params?, config?): Promise <SCPaginatedResponse<SCFeedUnitType>>

This endpoint retrieves the category trending feed.

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCFeedUnitType>>

Source

services/category/index.ts:130


getCategoryTrendingFollowers()

static getCategoryTrendingFollowers(id, params?, config?): Promise <SCPaginatedResponse<SCUserType>>

This endpoint returns all trending followers of a specific category during last n days (default 90) .

Parameters

ParameterTypeDescription
idstring | number
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCUserType>>

Source

services/category/index.ts:144


getFollowedCategories()

static getFollowedCategories(params?, config?): Promise <SCPaginatedResponse<SCCategoryType>>

This endpoint retrieves all followed categories by the user.

Parameters

ParameterTypeDescription
params?CategoryParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCCategoryType>>

Source

services/category/index.ts:175


getPopularCategories()

static getPopularCategories(params?, config?): Promise <SCPaginatedResponse<SCCategoryType>>

This endpoint retrieves all categories ordered by the number of followers (in descending order).

Parameters

ParameterTypeDescription
params?BaseGetParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCCategoryType>>

Source

services/category/index.ts:184


getSpecificCategory()

static getSpecificCategory(id, config?): Promise<SCCategoryType>

This endpoint retrieves a specific category.

Parameters

ParameterTypeDescription
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryType>

Source

services/category/index.ts:62


patchASpecificCategory()

static patchASpecificCategory(id, data, config?): Promise<SCCategoryType>

This endpoint patches a specific category.

Parameters

ParameterTypeDescription
idstring | number
dataSCCategoryType
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryType>

Source

services/category/index.ts:82


searchCategory()

static searchCategory(params?, config?): Promise <SCPaginatedResponse<SCCategoryType>>

This endpoint performs category search.

Parameters

ParameterTypeDescription
params?CategoryParams
config?AxiosRequestConfig<any>

Returns

Promise <SCPaginatedResponse<SCCategoryType>>

Source

services/category/index.ts:44


updateASpecificCategory()

static updateASpecificCategory(id, data, config?): Promise<SCCategoryType>

This endpoint updates a specific category.

Parameters

ParameterTypeDescription
idstring | number
dataSCCategoryType
config?AxiosRequestConfig<any>

Returns

Promise<SCCategoryType>

Source

services/category/index.ts:72