跳转到主要内容

信息查询

查询玩家的好友数量和好友等待人数信息。

调用信息

FriendInfo(String friendCode, PlayNANOODelegate callback) {}

调用详细信息

参数说明类型
friendCode好友表识别代码string
callback通信结果PlayNANOODelegate

源代码

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");
}
});
}
}

通信结果

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

结果详细信息

数据键说明类型
relationship_count已注册好友数integer
ready_count好友注册等待人数integer