Skip to main content

Query Information

Queries information about the number of friends a player has and the number of pending friend requests.

Call InformationInformation

FriendInfo(String friendCode, PlayNANOODelegate callback) {}

Call Information Details

ParameterDescriptionType
friendCodeFriend table identification codestring
callbackCommunication resultPlayNANOODelegate

Source Code

using PlayNANOO;

public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;

void Awake()
{
plugin = Plugin.GetInstance();

string friendCode = "string";
plugin.FriendInfo(friendCode, (state, message, rawData, dictionary) => {
if(state.Equals(Configure.PN_API_STATE_SUCCESS)) {
Debug.Log(value["relationship_count"]);
Debug.Log(value["ready_count"]);
} else {
Debug.Log("Fail");
}
});
}
}

Communication Result

HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code" : 200,
"message" : 0,
"value" : {
"relationship_count" : "Integer"
"ready_count" : "Integer"
}
}

Result Details

Data KeyDescriptionType
relationship_countNumber of friends registeredinteger
ready_countNumber of pending friend requestsinteger