Home Reference Source
public class | source

TagService

Extends:

BaseService → TagService

Interact with tag API service

Method Summary

Public Methods
public

create(data: object, callback: Function): *

Create new tag

public

fetch(opts: object): *

Fetch paginated tag items

public

fetchOne(id: string, opts: object, forceUpdate: Boolean): *

Fetch single tag

public

remove(id: string): *

Remove (delete) tag

public

reset(): *

public

search(opts: object): *

Run a query on the search endpoint.

public

update(id: string, data: object, callback: Function): *

Update existing tag

public

updatePagination(pagination: *): *

public

updateTag(tag: *): *

public

updateTags(tags: *): *

Inherited Summary

From class BaseService
public

Preform a DELETE action

public

get(url: string, params: object): object

Preform a GET action

public

post(url: string, data: object, params: object): object

Preform a POST action

public

postUpload(url: string, data: object, params: object): object

Preform a POST action

public

put(url: string, data: object): object

Preform a PUT action

Public Methods

public create(data: object, callback: Function): * source

Create new tag

Params:

NameTypeAttributeDescription
data object

Hash of content data

callback Function

Return:

*

public fetch(opts: object): * source

Fetch paginated tag items

Params:

NameTypeAttributeDescription
opts object

Hash of query options

Return:

*

public fetchOne(id: string, opts: object, forceUpdate: Boolean): * source

Fetch single tag

Params:

NameTypeAttributeDescription
id string

UUID

opts object

Hash of query options

forceUpdate Boolean

If true (default) force update to store, otherwise, don't

Return:

*

public remove(id: string): * source

Remove (delete) tag

Params:

NameTypeAttributeDescription
id string

Return:

*

public reset(): * source

Return:

*

Run a query on the search endpoint. See search docs for query info

Params:

NameTypeAttributeDescription
opts object

Query has

Return:

*

public update(id: string, data: object, callback: Function): * source

Update existing tag

Params:

NameTypeAttributeDescription
id string

UUID

data object

Hash of tag data

callback Function

Return:

*

public updatePagination(pagination: *): * source

Params:

NameTypeAttributeDescription
pagination *

Return:

*

public updateTag(tag: *): * source

Params:

NameTypeAttributeDescription
tag *

Return:

*

public updateTags(tags: *): * source

Params:

NameTypeAttributeDescription
tags *

Return:

*