achievementList() extract function to isAchievementAwarded(idAch) is Required

Hi,
My name is Maulidan from Maulidan Productions - Games Studio. I’m a new user here.
So my team has just implemented ID NET API and found that function achievementList() should give a detail about the JSON Object (that is get from handleIDNET(e:Event) from IDI.as). For the existing version, the documentation is only giving detail about idnet.data.errorcode that we can got it from IDI.as. But I think it should explain about how to get the status of each achievement.

We actually has found the mechanism by using JSON class in AS3. “idnet.data” is an Object, correct? Then by using JSON.stringify(idnet.data) we then can get its attribute : errorcode (int), achievements (array), and success (bool). Then inside “achievements” there are many attributes such as awarded (int) and description (string).

Our point is, seems developers need to know that way (the way to extract the data from function achievementList()), so when they want to use it to update the achievement status in their game data, they can get it easily. Or it also better if inside the API, there is a function about getting the achievement status, such as : isAchievementAwarded(idAch:int). Just suggestion (y)

Cheers

Hi Maulidan,

You are right, to see all data being returned by the APIs in the AS3 SDK, add the following inside handleIDNET.

trace(idnet.type);
trace(JSON.stringify(idnet.data))

About your suggestion to explain the data sets being returned, I think it’s a good idea. If you want some quick info for the time being, check out playtomic Docs. The Game API is based on that. I will continue improving the docs for our specific implementation. Thank you for the suggestion.

Cheers

Hello,

Related to _idnet.achievementsList() call : it comes up with all the achievements, not only the current user’s.
I am interested to see the unlocked achievements for the currently logged user.

Thank you

Hi, The idnet.achievementsList call will return the player’s achievements along with the list of app achievements.

So while looping through them, do something like the following to determine if the player has unlocked the achievement.

if(achievements[i].hasOwnProperty('player')){
    //unlocked
}
1 Like

iam chating private
ilike thes web

Y8 Games