Constructor
new NSCredential(nation, passwordnullable, autologinnullable)
Creates a new NSCredential
instance with the given details.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
nation |
string | Name of the nation the login credentials are for |
||
password |
string |
<nullable> |
null | Password for the nation |
autologin |
string |
<nullable> |
null | Autologin code for the nation |
Members
(nullable) autologin :string
The nation's password in encrypted form, as provided by NationStates.
Type:
- string
nation :string
Name of the nation the login credentials are for.
Type:
- string
(nullable) password :string
The nation's password.
Type:
- string
(nullable) pin :string
The login PIN of the current session. Valid until the nation next logins without it, logs out, or is idle for two hours.
Type:
- string
Methods
updateFromResponse(responseHeaders)
Updates the autologin and PIN data from the provided header data.
Parameters:
Name | Type | Description |
---|---|---|
responseHeaders |
http.IncomingHttpHeaders | HTTP headers returned by the NS API. |