Query Friend Request List
Queries information on players with pending friend requests.
Call Information
FriendReady(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.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");
}
});
}
}
Communication Result
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"
}
]
}
Communication Result
Data Key | Description | Type |
---|---|---|
relationship_code | Friend relationship identification code | string |
uuid | Player's unique ID | string |
nickname | Player's nickname | string |
access_timezone | Player's access timezone | string |
access_diff | Time elapsed in seconds since last login | integer |
access_timestamp | Player's last login Unix Timestamp | integer |