WiiConnect24 functionality, directly within JS
To send mail via WiiConnect24 and query error code strings, you utilize
wiiNwc24. With mail, you can send normal messages, or gift titles. And via error codes, you can provide a better user experience.
var nwc24 = new wiiNwc24();
Returns the amount of friends on the user's friends list.
Queries information about the given friend list entry at
Sends a mail using the gift design template with a body of the given
Similar to the above, however lacking the
Similar to the above. As the name implies, no mail design template is applied.
Returns whether the internal mail engine is currently processing an operation.
Displays an error with
Handles function for the button displayed on the left within errors. Depending on the error type, the button either effectively goes to the last loaded page in history, or it resets the channel.
Called whenever the button on the right within error pages is selected. Depending on the error type, it either loads the initially loaded URL (for example,
You query information about entries within the user's friends list via
nwc24.getFriendInfo(num, type). There are three available query types:
Returns the registered name for this friend as a string.
Returns the registered friend code as a string.
Unlike ECProgress as utilized within EC, Nintendo chose yet another design. Users are expected to repeatedly query
Returns a string with the current console's friend code.
Returns a number with the current registered mail error code.
Returns a string with a formatted error code. For example, assuming a console with its language set to English, one might return "Error code: 123456".
Returns a localized string with a description of the error message.
Returns a boolean on whether an NWC24 error has been set. TODO: Is this fully what the function performs?
Determines on whether a message can be sent at call time, i.e. if the scheduler is busy. TODO: Verify logic
Returns a localized string to be displayed on the button within the given side of the page. The button's string is determined from several factors. For the right button:
For the left button: