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
Parameter | Description | Type |
---|---|---|
friendCode | Friend table identification code | string |
callback | Communication result | PlayNANOODelegate |
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 Key | Description | Type |
---|---|---|
relationship_count | Number of friends registered | integer |
ready_count | Number of pending friend requests | integer |