Skip to content

DataResponse ​

A response to a request for game data.

Kind: Class

Namespace: ConnectorLib.JSON

Inheritance: SimpleJSONResponse

Public Constructors

DataResponse(string key, EffectStatus status, object value = null, long timeRemaining = 0, string message = null)

Creates a new instance of the ConnectorLib.JSON.DataResponse class.

Public Static Functions

DataResponse

SuccessIfDefined(string key, object value, string failMessage = "")

Creates a success response if the value is defined (not null or empty).

DataResponse

Success(string key, object value)

Creates a success response with the specified key and value.

DataResponse

Success(string key, object value, string message)

Creates a success response with the specified key and value.

DataResponse

Failure(string key)

Creates a failure response with the specified key.

DataResponse

Failure(string key, string message)

Creates a failure response with the specified key.

DataResponse

Failure(string key, object value, string message = null)

Creates a failure response with the specified key.

DataResponse

Retry(string key, long delay = 0, string message = null)

Creates a retry response with the specified key and message.

Public Attributes

string

key

The key corresponding to the requested value.

JToken

value

The value returned by the client.

EffectStatus

status

The status of the request.

long

timeRemaining

The due time of the request, if applicable.

string

message

The message from the client (if any).