Type Function Library gamecircle.* Return value None Revision Release 2024.3703 Keywords Achievement, get
This function fetches an achievement’s information based on the GameCircle ID assigned to it by the developer on Amazon’s servers.
gamecircle.Achievement.GetAchievement( id, callback )
String. The GameCircle ID of the achievement to be fetched from Amazon’s servers.
Function. The callback function for when the achievement’s information has been fetched. The callback will recieve a single parameter of type AchievementReturn
local achievementID = "myFirstAchievement" local gamecircle = require("plugin.gamecircle") gamecircle.Init(true, false, false) function AchievementCallback(returnValue) if returnValue.isError == true then print("Get Achievement request returned with error message: " .. returnValue.errorMessage) else local achievement = returnValue.achievement print("Achievement information recieved!") print("-id: " .. achievement.id) print("-title: " .. achievement.title) print("-desc: " .. achievement.desc) print("-isUnlocked: " .. achievement.isUnlocked) print("-unlockedDate: " .. achievement.unlockDate) print("-imageURL: " .. achievement.imageURL) print("-isHidden: " .. achievement.isHidden) print("-pointValue: " .. achievement.pointValue) print("-position: " .. achievement.position) print("-progress: " .. achievement.progress) end end gamecircle.Achievement.GetAchievement(achievementID, AchievementCallback)