Class: TagApiClient
services/tag.TagApiClient
Contains all the endpoints needed to manage tags. All endpoints require admin role.
Constructors
constructor
• new TagApiClient(): TagApiClient
Returns
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
Name | Type |
---|---|
id | string | number |
user? | number |
category? | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCTagType
>
Defined in
createTag
▸ createTag(data
, config?
): Promise
<SCTagType
>
This endpoint creates a tag
Parameters
Name | Type |
---|---|
data | TagParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCTagType
>
Defined in
getAllTags
▸ getAllTags(params?
, config?
): Promise
<SCPaginatedResponse
<SCTagType
>>
This endpoint retrieves all tags.
Parameters
Name | Type |
---|---|
params? | TagGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCTagType
>>
Defined in
getSpecificTag
▸ getSpecificTag(id
, config?
): Promise
<SCTagType
>
This endpoint retrieves a specific tag.
Parameters
Name | Type |
---|---|
id | string | number |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCTagType
>
Defined in
patchTag
▸ patchTag(id
, data?
, config?
): Promise
<SCTagType
>
This endpoint patches a specific tag.
Parameters
Name | Type |
---|---|
id | string | number |
data? | TagParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCTagType
>
Defined in
searchTag
▸ searchTag(params?
, config?
): Promise
<SCPaginatedResponse
<SCTagType
>>
This endpoint performs tag search.
Parameters
Name | Type |
---|---|
params? | TagGetParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCPaginatedResponse
<SCTagType
>>
Defined in
updateTag
▸ updateTag(id
, data?
, config?
): Promise
<SCTagType
>
This endpoint updates a specific tag.
Parameters
Name | Type |
---|---|
id | string | number |
data? | TagParams |
config? | AxiosRequestConfig <any > |
Returns
Promise
<SCTagType
>