Online saving allows a player to store their game data online, so they can start where they left off on different devices and websites. The APIs can save, retrieve, and delete small amounts of data like a game state. Data is limited to 50 Kb and API calls are blocked after 150 have been sent in 5 minutes.
Player data is referenced using a key. Player data saved using a key will be accessible using the same key.
Examples of data that can be stored by Y8 Account
Number of levels cleared.
Total number of coins earned.
Unlocked shop items.
It is possible to use different data types like String, Int, Vectors, Arrays, and a user defined Class. The Get API will return the same data type.
To minmize the amount of API calls being made, combine data in a single Class (see Post a Class below). This will prevent a game from making too many API calls and hitting the 150 calls per a 5 minute limit.
You may get an exception `not_saved` while posting data. This may occur only if you send the same key data repeatedly with delay less than 5 seconds, hence your data will be ignored by server.
Post a Class (Recommended)
Example of Creating a Class
Post a String
Post an Array
Post Data Without Using a Callback
Delete Online Save
This API deletes all saved data of a player stored online. It’s usful for testing or in games that have a reset button.