Home Reference Source
public class | source

Api

Extends:

Queueable → Api

Method Summary

Public Methods
public

get(pid: number, json: object)

Make a GET request

public

post(pid: number, json: object)

Make a POST request

public

put(pid: number, json: object)

Make a PUT request

public

websocketInit(pid: number, json: object)

Create a new websocket

public

websocketPop(pid: *, json: *)

public

websocketSend(pid: number, json: object)

Send a json message down the websocket

Private Methods
private
private

Inherited Summary

From class Queueable
public

queue: *

public
public

finished(pid: *, mode: *)

Call this method after you command has finished.

public

init(queue: *)

init, override this for any promise based inits setting the self.ready=true after the promise

public

set(pid: *, value: *)

public

start(pid: *, command: *, json: *)

Called from queue, starts running the actual command

Public Methods

public get(pid: number, json: object) source

Make a GET request

Params:

NameTypeAttributeDescription
pid number

Process ID

json object

queue arguments

json.url string

URL to make GET request to

json.contentType string
  • default: application/json

Content type to request

json.header string

header object to send (note Content-Type is overwritten by above setting)

json.name string

name of error queue to use

public post(pid: number, json: object) source

Make a POST request

Params:

NameTypeAttributeDescription
pid number

Process ID

json object

queue arguments

json.url string

URL to make GET request to

json.contentType string
  • default: application/json

Content type to request

json.header string

header object to send (note Content-Type is overwritten by above setting)

json.body string

object to send JSON.stringify is applies to this

json.name string

name of error queue to use

public put(pid: number, json: object) source

Make a PUT request

Params:

NameTypeAttributeDescription
pid number

Process ID

json object

queue arguments

json.url string

URL to make PUT request to

json.contentType string
  • default: application/json

Content type to request

json.header string

header object to send (note Content-Type is overwritten by above setting)

json.body string

object to send JSON.stringify is applies to this

json.name string

name of error queue to use

public websocketInit(pid: number, json: object) source

Create a new websocket

Params:

NameTypeAttributeDescription
pid number

Process ID

json object

queue arguments

json.url string

URL to connect websocket too

json.action string

What json param will contain the 'action' router

json.queues string

Array of {action:"action", queue:"queue" }

public websocketPop(pid: *, json: *) source

Params:

NameTypeAttributeDescription
pid *
json *

public websocketSend(pid: number, json: object) source

Send a json message down the websocket

Params:

NameTypeAttributeDescription
pid number

Process ID

json object

queue arguments

json.message string

JSON message to send

json.bulk string

Bulk messages

json.bulk string

Bulk bulkQueue

json.debug string

Debug to console

json.sendQueue string

Queue to always call on send

Private Methods

private _websocketSendActual(json: *) source

Params:

NameTypeAttributeDescription
json *

private _websocketSendPacket() source