-
Notifications
You must be signed in to change notification settings - Fork 3
NewgroundsIO.objects.SaveSlot
- SaveSlot
-
Contains information about a CloudSave slot.
-
getDataCallback :
function
-
responseCallback :
function
Contains information about a CloudSave slot.
Kind: global class
-
SaveSlot
- new SaveSlot(props)
-
.id :
Number
-
.size :
Number
-
.datetime :
String
-
.timestamp :
Number
-
.url :
String
- .hasData
- .getData(callback, thisArg)
- .setData(data, callback, thisArg)
- .clearData(callback, thisArg)
-
.getDate() ⇒
Date
Constructor
Param | Type | Description |
---|---|---|
props | object |
An object of initial properties for this instance |
props.id | Number |
The slot number. |
props.size | Number |
The size of the save data in bytes. |
props.datetime | String |
A date and time (in ISO 8601 format) representing when this slot was last saved. |
props.timestamp | Number |
A unix timestamp representing when this slot was last saved. |
props.url | String |
The URL containing the actual save data for this slot, or null if this slot has no data. |
The slot number.
Kind: instance property of SaveSlot
The size of the save data in bytes.
Kind: instance property of SaveSlot
A date and time (in ISO 8601 format) representing when this slot was last saved.
Kind: instance property of SaveSlot
A unix timestamp representing when this slot was last saved.
Kind: instance property of SaveSlot
The URL containing the actual save data for this slot, or null if this slot has no data.
Kind: instance property of SaveSlot
This will be true if this save slot has any saved data.
Kind: instance property of SaveSlot
Loads the save file for this slot then passes its contents to a callback function.
Kind: instance method of SaveSlot
Param | Type | Description |
---|---|---|
callback | getDataCallback |
A function to call when your data is loaded. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Unlocks this medal, then fires a callback.
Kind: instance method of SaveSlot
Param | Type | Description |
---|---|---|
data | string |
The data, in a serialized string, you want to save. |
callback | responseCallback |
An optional function to call when the data is saved on the server. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Clears all data from this slot, then fires a callback
Kind: instance method of SaveSlot
Param | Type | Description |
---|---|---|
callback | responseCallback |
An optional function to call when the data is cleared from the server. |
thisArg | object |
An optional object to use as 'this' in your callback function. |
Gets the date this slot was last updated.
Kind: instance method of SaveSlot
Kind: global typedef
Param | Type | Description |
---|---|---|
data | string |
The data loaded from the server |
Kind: global typedef
Param | Type |
---|---|
serverResponse | NewgroundsIO.objects.Response |