Skip to main content

Class: TagApiClient

services/tag.TagApiClient

Contains all the endpoints needed to manage tags. All endpoints require admin role.

Constructors

constructor

new TagApiClient(): TagApiClient

Returns

TagApiClient

Methods

assignATag

assignATag(id, user?, category?, config?): Promise<SCTagType>

This endpoint assigns a tag to a user or to a category. One param between "user" and "category" need to be passed to this endpoint.

Parameters

NameType
idstring | number
user?number
category?number
config?AxiosRequestConfig<any>

Returns

Promise<SCTagType>

Defined in

services/tag/index.ts:88


createTag

createTag(data, config?): Promise<SCTagType>

This endpoint creates a tag

Parameters

NameType
dataTagParams
config?AxiosRequestConfig<any>

Returns

Promise<SCTagType>

Defined in

services/tag/index.ts:37


getAllTags

getAllTags(params?, config?): Promise<SCPaginatedResponse<SCTagType>>

This endpoint retrieves all tags.

Parameters

NameType
params?TagGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCTagType>>

Defined in

services/tag/index.ts:27


getSpecificTag

getSpecificTag(id, config?): Promise<SCTagType>

This endpoint retrieves a specific tag.

Parameters

NameType
idstring | number
config?AxiosRequestConfig<any>

Returns

Promise<SCTagType>

Defined in

services/tag/index.ts:56


patchTag

patchTag(id, data?, config?): Promise<SCTagType>

This endpoint patches a specific tag.

Parameters

NameType
idstring | number
data?TagParams
config?AxiosRequestConfig<any>

Returns

Promise<SCTagType>

Defined in

services/tag/index.ts:76


searchTag

searchTag(params?, config?): Promise<SCPaginatedResponse<SCTagType>>

This endpoint performs tag search.

Parameters

NameType
params?TagGetParams
config?AxiosRequestConfig<any>

Returns

Promise<SCPaginatedResponse<SCTagType>>

Defined in

services/tag/index.ts:46


updateTag

updateTag(id, data?, config?): Promise<SCTagType>

This endpoint updates a specific tag.

Parameters

NameType
idstring | number
data?TagParams
config?AxiosRequestConfig<any>

Returns

Promise<SCTagType>

Defined in

services/tag/index.ts:66