Query Friend Request List
Queries information on pending (unapproved) players.
Call Information
FriendReady(String friendCode, PlayNANOODelegate callback) {}
Call 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.FriendReady(friendCode, (state, message, rawData, dictionary) => {
if(state.Equals(Configure.PN_API_STATE_SUCCESS)) {
foreach (Dictionary<string, object> value in (ArrayList)dictionary["friends"])
{
Debug.Log(value["relationship_code"]);
Debug.Log(value["uuid"]);
Debug.Log(value["nickname"]);
Debug.Log(value["access_timezone"]);
Debug.Log(value["access_diff"]);
Debug.Log(value["access_timestamp"]);
}
} else {
Debug.Log("Fail");
}
});
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code" : 200,
"message" : 0,
"value" : [
{
"relationship_code" : "String"
"uuid" : "String",
"nickname" : "String",
"access_timezone" : "String",
"access_diff" : "Integer",
"access_timestamp" : "Integer"
}
]
}
Response Details
| Data Key | Description | Type |
|---|---|---|
| relationship_code | Friend relationship identification code | string |
| uuid | Player identification ID | string |
| nickname | Player nickname | string |
| access_timezone | Player access time timezone | string |
| access_diff | Time elapsed since last login based on current time (in seconds) | integer |
| access_timestamp | Player last login time Unix Timestamp | integer |