redeeming

This file contains functions related to the handling of passcode redeeming in Ingress.

Members

inner, constant REDEEM_SHORT_NAMES :Object

Provides a scale factor for short names of various Ingress items used in passcode rewards.

inner, constant REDEEM_STATUSES :Object

HTTP status codes and corresponding messages returned by the redemption API.

Methods

inner formatPasscodeLong(data) → {string}

Formats passcode reward data into a long, detailed html string.

Parameters:
Name Type Description
data Object

The reward data.

Returns:
string -

Formatted string representing the detailed rewards.

inner formatPasscodeShort(data) → {string}

Formats passcode reward data into a short, concise html string.

Parameters:
Name Type Description
data Object

The reward data.

Returns:
string -

Formatted string representing the concise rewards.

inner handleRedeemResponse(data, textStatus, jqXHR)

Handles the response from the passcode redeeming API.

Parameters:
Name Type Description
data Object

The data returned by the API.

textStatus string

The status of the response.

jqXHR jqXHR

The jQuery wrapped XMLHttpRequest object.

inner setupRedeem()

Sets up the redeem functionality, binding to UI elements.