-
Notifications
You must be signed in to change notification settings - Fork 4
NewgroundsIO.results.Medal.getList
NGIO singleton wrapper for NewgroundsIO Library.
Kind: global class
-
NGIO
-
instance
-
.ngioCore :
NewgroundsIO.Core
-
.ngioCore :
-
static
-
.STATUS_INITIALIZED :
string
-
.STATUS_CHECKING_LOCAL_VERSION :
string
-
.STATUS_LOCAL_VERSION_CHECKED :
string
-
.STATUS_PRELOADING_ITEMS :
string
-
.STATUS_ITEMS_PRELOADED :
string
-
.STATUS_READY :
string
-
.STATUS_SESSION_UNINITIALIZED :
string
-
.STATUS_WAITING_FOR_SERVER :
string
-
.STATUS_LOGIN_REQUIRED :
string
-
.STATUS_WAITING_FOR_USER :
string
-
.STATUS_LOGIN_CANCELLED :
string
-
.STATUS_LOGIN_SUCCESSFUL :
string
-
.STATUS_LOGIN_FAILED :
string
-
.STATUS_USER_LOGGED_OUT :
string
-
.STATUS_SERVER_UNAVAILABLE :
string
-
.STATUS_EXCEEDED_MAX_ATTEMPTS :
string
-
.PERIOD_TODAY :
string
-
.PERIOD_CURRENT_WEEK :
string
-
.PERIOD_CURRENT_MONTH :
string
-
.PERIOD_CURRENT_YEAR :
string
-
.PERIOD_ALL_TIME :
string
-
.PERIODS :
Array.<string>
-
.medals :
Array.<NewgroundsIO.objects.Medal>
-
.scoreBoards :
Array.<NewgroundsIO.objects.ScoreBoard>
-
.saveSlots :
Array.<NewgroundsIO.objects.SaveSlot>
-
.lastExecution :
Date
-
.lastConnectionStatus :
string
-
.sessionError :
NewgroundsIO.objects.Error
-
.legalHost :
boolean
-
.isDeprecated :
boolean
-
.newestVersion :
boolean
-
.loginPageOpen :
boolean
-
.gatewayVersion :
string
-
.lastMedalUnlocked :
NewgroundsIO.objects.Medal
-
.lastBoardPosted :
NewgroundsIO.objects.ScoreBoard
-
.lastScorePosted :
NewgroundsIO.objects.Score
-
.lastGetScoresResult :
NewgroundsIO.results.ScoreBoard.getScores
-
.lastSaveSlotLoaded :
NewgroundsIO.objects.SaveSlot
-
.lastSaveSlotSaved :
NewgroundsIO.objects.SaveSlot
-
.lastDateTime :
string
-
.lastLoggedEvent :
string
-
.lastTimeStamp :
number
-
.lastPingSuccess :
boolean
-
.isInitialized :
boolean
-
.session :
NewgroundsIO.objects.Session
-
.user :
NewgroundsIO.objects.User
-
.hasSession :
boolean
-
.hasUser :
boolean
-
.isReady :
boolean
-
.version :
string
-
.debugMode :
boolean
- .init(appID, aesKey, options)
- .skipLogin()
- .openLoginPage()
- .cancelLogin()
- .logOut()
- .loadAuthorUrl()
- .loadOfficialUrl()
- .loadMoreGames()
- .loadNewgrounds()
- .loadReferral(referralName)
- .getMedal(medalID)
- .unlockMedal(medalID, callback, thisArg)
- .getScoreBoard(scoreBoardID)
- .postScore(boardID, value, tag, callback, thisArg)
- .getScores(boardID, period, tag, social, callback, thisArg)
- .getSaveSlot(saveSlotID)
- .getTotalSaveSlots()
- .getSaveSlotData(slotID, callback, thisArg)
- .setSaveSlotData(slotID, data, callback, thisArg)
- .logEvent(eventName, callback, thisArg)
- .getDateTime(callback, thisArg)
- .keepSessionAlive()
- .getConnectionStatus(callback, thisArg)
-
.STATUS_INITIALIZED :
-
instance
A reference to the NewgroundsIO.Core instance created in Init().
Kind: instance property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
Kind: static property of NGIO
An array of preloaded medals
Kind: static property of NGIO
An array of preloaded scoreBoards
Kind: static property of NGIO
An array of preloaded saveSlots
Kind: static property of NGIO
The last time a component or queue was executed
Kind: static property of NGIO
Contains the last connection status. Value will be one of the STATUS_XXXXX constants.
Kind: static property of NGIO
Will be null unless there was an error in our session.
Kind: static property of NGIO
Will be set to false if the local copy of the game is being hosted illegally.
Kind: static property of NGIO
Will be set to true if this is an out-of-date copy of the game.
Kind: static property of NGIO
This is the version number(string) of the newest available copy of the game.
Kind: static property of NGIO
Will be true if the user opened the login page via OpenLoginPage().
Kind: static property of NGIO
The current version of the Newgrounds.io gateway.
Kind: static property of NGIO
Stores the last medal that was unlocked.
Kind: static property of NGIO
Stores the last scoreboard that was posted to.
Kind: static property of NGIO
Stores the last score that was posted to.
Kind: static property of NGIO
Stores the last scores that were loaded.
Kind: static property of NGIO
Stores the last saveSlot that had data loaded.
Kind: static property of NGIO
Stores the last saveSlot that had data saved.
Kind: static property of NGIO
Stores the last DateTime that was loaded from the API.
Kind: static property of NGIO
Stores the last event that was logged.
Kind: static property of NGIO
Stores the last unix timestamp that was loaded API.
Kind: static property of NGIO
Stores wether the last server ping succeeded.
Kind: static property of NGIO
Will be true if we've called Init().
Kind: static property of NGIO
Contains all information about the current user session.
Kind: static property of NGIO
Contains user information if the user is logged in. Otherwise null.
Kind: static property of NGIO
Returns true if we currently have a valid session ID.
Kind: static property of NGIO
Returns true if we currently have a valid session ID.
Kind: static property of NGIO
Will be true if we've finished logging in and preloading data.
Kind: static property of NGIO
The version number passed in Init()'s options
Kind: static property of NGIO
Will be tue if using debugMode via Init()
Kind: static property of NGIO
Initializes the NGIO wrapper. You must call this BEFORE using any other methods!
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
appID | string |
The App ID from your Newgrounds Project's "API Tools" page. |
aesKey | string |
The AES-128 encryption key from your Newgrounds Project's "API Tools" page. |
options | object |
An object of options to set up the API wrapper. |
options.debugMode | boolean |
Set to true to run in debug mode. |
options.version | string |
A string in "X.X.X" format indicating the current version of this game. |
options.checkHostLicense | boolean |
Set to true to check if the site hosting your game has been blocked. |
options.preloadMedals | boolean |
Set to true to preload medals (will show if the player has any unlocked, and get their current medal score). |
options.preloadeScoreBoards | boolean |
Set to true to preload Score Board information. |
options.preloadeSaveSlots | boolean |
Set to true to preload Save Slot information. |
options.autoLogNewView | boolean |
Set to true to automatcally log a new view to your stats. |
Call this if you want to skip logging the user in.
Kind: static method of NGIO
Opens the Newgrounds login page in a new browser tab.
Kind: static method of NGIO
If the user opened the NG login page, you can call this to cancel the login attempt.
Kind: static method of NGIO
Logs the current use out of the game (locally and on the server) and resets the connection status.
Kind: static method of NGIO
Loads "Your Website URL", as defined on your App Settings page, in a new browser tab.
Kind: static method of NGIO
Loads our "Official Version URL", as defined on your App Settings page, in a new browser tab.
Kind: static method of NGIO
Loads the Games page on Newgrounds in a new browser tab.
Kind: static method of NGIO
Loads the Newgrounds frontpage in a new browser tab.
Kind: static method of NGIO
Loads the Newgrounds frontpage in a new browser tab.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
referralName | string |
The name of your custom referral. |
Gets a preloaded Medal object.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
medalID | number |
The ID of the medal |
Attempts to unlock a medal and returns the medal to an optional callback function when complete.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
medalID | number |
The id of the medal you are unlocking. |
callback | unlockMedalCallback |
A function to run when the medal has unlocked. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Gets a preloaded ScoreBoard object.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
scoreBoardID | number |
The ID of the score board |
Posts a score and returns the score and scoreboard to an optional callback function when complete.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
boardID | number |
The id of the scoreboard you are posting to. |
value | number |
The integer value of your score. |
tag | string |
An optional tag to attach to the score (use null for no tag). |
callback | postScoreCallback |
A function to run when the score has posted. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Gets the best scores for a board and returns the board, score list, period, tag and social bool to an optional callback.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
boardID | number |
The id of the scoreboard you loading from. |
period | string |
The time period to get scores from. Will match one of the PERIOD_XXXX constants. |
tag | string |
An optional tag to filter results by (use null for no tag). |
social | boolean |
Set to true to only get scores from the user's friends. |
callback | getScoresCallback |
A function to run when the scores have been loaded. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Gets a preloaded SaveSlot object. (Use getSaveSlotData to get actual save file)
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
saveSlotID | number |
The desired slot number |
Gets the number of non-empty save slots.
Kind: static method of NGIO
Loads the actual save file from a save slot, and passes the string result to a callback function.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
slotID | number |
The slot number to load from |
callback | getSaveSlotDataCallback |
A function to run when the file has been loaded |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Loads the actual save file from a save slot and returns the save slot to an optional callback function when complete.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
slotID | number |
The slot number to save to. |
data | string |
The (serialized) data you want to save. |
callback | setSaveSlotDataCallback |
An optional function to run when the file finished saving. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Logs a custom event and returns the eventName to an optional callback function when complete.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
eventName | string |
The name of the event to log. |
callback | logEventCallback |
A function to run when the event has logged. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Loads the current DateTime from the server and returns it to an optional callback function.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
callback | getDateTimeCallback |
A function to run when the datetime has loaded. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Keeps your ssessions from expiring. Is called automatically. This will only hit the server once every 30 seconds, no matter how often you call it.
Kind: static method of NGIO
Intended to be called from your game loop, this does an entire process of things based on your Init() options:
- Checks if the hosting site has a legal copy of this game
- Checks for a newer version of the game
- Makes sure you have a user session
- Checks if the current user is logged in
- Preloads Medals, Saveslots, etc
- Logs a new view to your stats
Whenever a new operation begins or ends, the current state will be passed to your callback function.
Kind: static method of NGIO
Param | Type | Description |
---|---|---|
callback | getConnectionStatusCallback |
A function to be called when there's a change of status. Will match one of the STATUS_XXXX constants. |
thisArg | object |
An optional object to use as 'this' in your callback function. |