JavaScript Client SDK
Class Index | File Index

Classes


Class ServerAgent


Extends HTTPAgent.
Use the ServerAgent class to make requests to the server, automatically adding the Akula sessionId header if you are logged in. If you are not logged in and a request is attempted, an error will be thrown.
Defined in: ServerAgent.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
ServerAgent(settings)
Creates a new ServerAgent object.
Method Summary
Method Attributes Method Name and Description
 
del(endpoint, options, callback)
Send an HTTP DELETE request through jQuery, bundling the preset settings into the request.
 
deleteSplitData(endpoint, options, callback)
Send an HTTP DELETE request with the expectation of receiving split data in return, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
 
get(endpoint, options, callback)
Send an HTTP GET request through jQuery, bundling the preset settings into the request.
 
getSplitData(endpoint, options, callback)
Send an HTTP GET request for split data, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
 
post(endpoint, data, options, callback)
Send an HTTP POST request through jQuery, bundling the preset settings into the request.
 
postSplitData(endpoint, data, options, callback)
Send an HTTP POST request with the expectation of receiving split data in return, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
 
put(endpoint, data, options, callback)
Send an HTTP PUT request through jQuery, bundling the preset settings into the request.
 
putSplitData(endpoint, data, options, callback)
Send an HTTP PUT request with the expectation of receiving split data in return, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
 
request(options)
Send a raw jQuery.ajax request throught jQuery.ajax, bundling the preset settings into the request.
Class Detail
ServerAgent(settings)
Creates a new ServerAgent object.
Parameters:
{Object} settings
A jQuery.ajax() compatible settings object containing the settings to be included with every request. See http://api.jquery.com/jQuery.ajax for details.
Since:
1.0
Method Detail
{jqXHR} del(endpoint, options, callback)
Send an HTTP DELETE request through jQuery, bundling the preset settings into the request.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success(), error(), and complete() callback methods.
Since:
1.0
Returns:
{jqXHR} The jqXHR object associated with the request. See http://api.jquery.com/jQuery.ajax/#jqXHR for details.
deleteSplitData(endpoint, options, callback)
Send an HTTP DELETE request with the expectation of receiving split data in return, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success() and error() callback methods. the success callback should consume data, statusText, the raw jqXHR response, and an HTTPSplitResponseHandler. the error callback will take a jqXHR object, textStatus, errorThrown, and an HTTPSplitReponseHandler. both success and error callbacks can use the provided HTTPSplitResponseHandler methods to request the next set of split data, retry the current set, or clear the split data cache on the server.
Since:
2.5.0
Returns:
nothing
{jqXHR} get(endpoint, options, callback)
Send an HTTP GET request through jQuery, bundling the preset settings into the request.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success(), error(), and complete() callback methods.
Since:
1.0
Returns:
{jqXHR} The jqXHR object associated with the request. See http://api.jquery.com/jQuery.ajax/#jqXHR for details.
getSplitData(endpoint, options, callback)
Send an HTTP GET request for split data, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success() and error() callback methods. the success callback should consume data, statusText, the raw jqXHR object and an HTTPSplitResponseHandler. the error callback will take a jqXHR object, textStatus, errorThrown, and an HTTPSplitReponseHandler. both success and error callbacks can use the provided HTTPSplitResponseHandler methods to request the next set of split data or retry the current set as necessary.
Since:
2.5.0
Returns:
nothing
{jqXHR} post(endpoint, data, options, callback)
Send an HTTP POST request through jQuery, bundling the preset settings into the request.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} data
The data object to be created on the server.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success(), error(), and complete() callback methods.
Since:
1.0
Returns:
{jqXHR} The jqXHR object associated with the request. See http://api.jquery.com/jQuery.ajax/#jqXHR for details.
postSplitData(endpoint, data, options, callback)
Send an HTTP POST request with the expectation of receiving split data in return, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} data
The data object to be created on the server.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success() and error() callback methods. the success callback should consume data, statusText, the raw jqXHR response, and an HTTPSplitResponseHandler. the error callback will take a jqXHR object, textStatus, errorThrown, and an HTTPSplitReponseHandler. both success and error callbacks can use the provided HTTPSplitResponseHandler methods to request the next set of split data, retry the current set, or clear the split data cache on the server.
Since:
2.5.0
Returns:
nothing
{jqXHR} put(endpoint, data, options, callback)
Send an HTTP PUT request through jQuery, bundling the preset settings into the request.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} data
The data object to be applied as a change on the server.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success(), error(), and complete() callback methods.
Since:
1.0
Returns:
{jqXHR} The jqXHR object associated with the request. See http://api.jquery.com/jQuery.ajax/#jqXHR for details.
putSplitData(endpoint, data, options, callback)
Send an HTTP PUT request with the expectation of receiving split data in return, bundling the preset settings into the request and calling the callback's success and fail methods for each chunk of data retrieved.
Parameters:
{String} endpoint
The Akula endpoint portion of the URL.
{Object} data
The data object to be applied as an update on the server.
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
{Object} callback Optional
Callback container that defines the success() and error() callback methods. the success callback should consume data, statusText, the raw jqXHR response, and an HTTPSplitResponseHandler. the error callback will take a jqXHR object, textStatus, errorThrown, and an HTTPSplitReponseHandler. both success and error callbacks can use the provided HTTPSplitResponseHandler methods to request the next set of split data, retry the current set, or clear the split data cache on the server.
Since:
2.5.0
Returns:
nothing
{jqXHR} request(options)
Send a raw jQuery.ajax request throught jQuery.ajax, bundling the preset settings into the request.
Defined in: HTTPAgent.js.
Parameters:
{Object} options Optional
A jQuery.ajax() compatible settings object containing any desired per-request custom options. See http://api.jquery.com/jQuery.ajax for details.
Since:
1.0
Returns:
{jqXHR} The jqXHR object associated with the request. See http://api.jquery.com/jQuery.ajax/#jqXHR for details.

©2013 Verivo Software, Inc. Documentation generated by JsDoc Toolkit 2.4.0 on Mon Apr 27 2015 15:06:19 GMT-0400 (EDT)