SA World SDK Documentation
  • 🛠 ENVIRONMENT SETUP
    • Overview
    • Getting Started
    • Sign Up for SAW SDK
    • Integration Steps
      • Step 1 - Install packages
      • Step 2 - Request credentials
      • Step 3 - Environments
      • Summary
    • SAW Sample Package
  • 🖥 SDK Integration Guides
    • Getting Started
    • Initialization
    • Authentication
    • Type Definition
    • User Data
      • getUser()
      • Account Data
        • getAccount()
        • getSub()
        • getEmail()
        • getName()
        • getUsername()
        • getGivenName()
        • getFamilyName()
      • Active Citizen Data
        • getCitizen()
        • getCitizenId()
        • getCitizenName()
        • getCitizenCode()
        • getCitizenWallet()
        • getCitizenLevel()
        • getCitizenAvatar()
      • Balance Data
        • getAP()
      • Saved Game Data
        • setGameData(...args)
        • getGameData()
      • Quest Data
        • getProcess()
        • claim(...args)
      • Friend Data
        • getFriendList()
        • sendFriendInvitation(...args)
        • responseFriendInvitation(...args)
        • getFriendInvitationList()
        • inviteGame(...args)
    • Game Play
      • Match Data
        • startMatch()
        • completeMatch(..args)
        • getMatchHistoryById(...args)
        • getAllMatchHistory(...args)
    • Quest
      • getList()
    • Achievement
      • getList()
  • 📌 Links
    • Report an Issue
    • Telegram Community Channel
    • Twitter
    • Discord
    • Facebook
Powered by GitBook
On this page
  • Overview:
  • Usage:
  • Requirement:
  • Parameters:
  • Return:
  • Error:
  1. 🖥 SDK Integration Guides
  2. User Data
  3. Saved Game Data

getGameData()

Overview:

Get user game data for the current game and current citizen.

You can get your saved data from the server through this API. The compressed flag will be the flag you set when calling the set API. If you set compressed by the server, then data from this API will automatically decompress to your raw data, otherwise, it will return your custom compressed data.

Usage:

client.user.data.getGameData()
.then((response) => {
    const userGameData = response;
    // write your code here.
})
.catch((error) => {
    // handle error.
})

Requirement:

none

Parameters:

none

Return:

  • Success:

Promise<IUserGameData>
  • Failed:

error

Error:

500 Internal Server Error
PrevioussetGameData(...args)NextQuest Data

Last updated 1 year ago