Home Reference Source
public class | source

AuthorService

Extends:

BaseService → AuthorService

Interact with author API service

Method Summary

Public Methods
public

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

Create new author

public

fetch(opts: object): *

Fetch paginated author items

public

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

Fetch single author

public

remove(id: string): *

Remove (delete) author

public

reset(): *

public

search(opts: object): *

Run a query on the search endpoint.

public

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

Update existing author

public

updateAuthor(author: *): *

public

updateAuthors(authors: *): *

public

updatePagination(pagination: *): *

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 author

Params:

NameTypeAttributeDescription
data object

Hash of content data

callback Function

Return:

*

public fetch(opts: object): * source

Fetch paginated author items

Params:

NameTypeAttributeDescription
opts object

Hash of query options

Return:

*

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

Fetch single author

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) author

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 author

Params:

NameTypeAttributeDescription
id string

UUID

data object

Hash of author data

callback Function

Return:

*

public updateAuthor(author: *): * source

Params:

NameTypeAttributeDescription
author *

Return:

*

public updateAuthors(authors: *): * source

Params:

NameTypeAttributeDescription
authors *

Return:

*

public updatePagination(pagination: *): * source

Params:

NameTypeAttributeDescription
pagination *

Return:

*