This file provides functions for sending AJAX requests to the Ingress API.
Methods
-
inner outOfDateUserPrompt()
-
Displays a dialog prompt to the user when the IITC version is out of date. Blocks all requests while the dialog is open.
-
inner postAjax(action, data, successCallback, errorCallback) → {jqXHR}
-
Sends an AJAX POST request to the Ingress API.
Parameters:
Name Type Description action
string The last part of the URL, automatically appended to the Ingress API endpoint.
data
Object JSON data to post. The method is derived automatically from action but may be overridden. Expects to be given a Hash. Strings are not supported.
successCallback
function Function to call on success. See jQuery API docs for available arguments.
errorCallback
function Function to call on error. Additionally, it is logged if the request failed.
Returns:
jqXHR -The jQuery wrapped XMLHttpRequest object.