Home Reference Source
public class | source

DraftService

Extends:

BaseService → DraftService

Interact with draft API service

Method Summary

Public Methods
public

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

Create new draft item

public

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

Fetch most recent draft

public

updateDraft(draft: *): *

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(srn: string, data: object, callback: Function): * source

Create new draft item

Params:

NameTypeAttributeDescription
srn string

Content SRN

data object

Hash of draft data

callback Function

Return:

*

public fetchOne(srn: string, opts: object): * source

Fetch most recent draft

Params:

NameTypeAttributeDescription
srn string

Content srn

opts object

Hash of query options

Return:

*

public updateDraft(draft: *): * source

Params:

NameTypeAttributeDescription
draft *

Return:

*