Home Reference Source
public class | source

ContainerService

Extends:

BaseService → ContainerService

Interact with container API service

Method Summary

Public Methods
public

checkinAndFetch(containerId: string, lockId: string): *

Attempt to release a container lock, then update container store

public

Attempt to obtain a container lock, then update the container store

public

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

Create new container item

public

fetch(opts: object): *

Fetch paginated container items

public

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

Fetch single container update

public

remove(id: string): *

Remove (delete) container item

public

search(opts: object): *

Run a query on the search endpoint.

public

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

Update existing container item

public

updateContainer(container: *): *

public

updateContainers(container: *): *

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 checkinAndFetch(containerId: string, lockId: string): * source

Attempt to release a container lock, then update container store

Params:

NameTypeAttributeDescription
containerId string

container UUID

lockId string

Lock UUID

Return:

*

public checkoutAndFetch(srn: string): * source

Attempt to obtain a container lock, then update the container store

Params:

NameTypeAttributeDescription
srn string

valid SRN

Return:

*

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

Create new container item

Params:

NameTypeAttributeDescription
data object

Hash of content data

callback Function

Return:

*

public fetch(opts: object): * source

Fetch paginated container items

Params:

NameTypeAttributeDescription
opts object

Hash of query options

Return:

*

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

Fetch single container update

Params:

NameTypeAttributeDescription
id string

UUID

opts object

Hash of query options

forceUpdate Boolean

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

Return:

*

public remove(id: string): * source

Remove (delete) container item

Params:

NameTypeAttributeDescription
id string

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 container item

Params:

NameTypeAttributeDescription
id string

UUID

data object

Hash of container data

callback Function

Return:

*

public updateContainer(container: *): * source

Params:

NameTypeAttributeDescription
container *

Return:

*

public updateContainers(container: *): * source

Params:

NameTypeAttributeDescription
container *

Return:

*

public updatePagination(pagination: *): * source

Params:

NameTypeAttributeDescription
pagination *

Return:

*