Home Reference Source
public class | source

VersionService

Extends:

BaseService → VersionService

Interact with version API service

Method Summary

Public Methods
public

fetch(srn: string, opts: object): *

Fetch all versions for given UUID

public

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

Fetch single version

public

updateVersion(version: *): *

public

updateVersions(version: *): *

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 fetch(srn: string, opts: object): * source

Fetch all versions for given UUID

Params:

NameTypeAttributeDescription
srn string

valid content SRN

opts object

hash of query options

Return:

*

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

Fetch single version

Params:

NameTypeAttributeDescription
id string

UUID

opts object

Hash of query options

forceUpdate Boolean

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

Return:

*

public updateVersion(version: *): * source

Params:

NameTypeAttributeDescription
version *

Return:

*

public updateVersions(version: *): * source

Params:

NameTypeAttributeDescription
version *

Return:

*