Random Search
Searches for recently connected players who are not friends.
Call Information
FriendRandomSearch(string friendCode, int searchLimit, PlayNANOODelegate callback) {}
Call Information Details
Parameter | Description | Type |
---|---|---|
friendCode | Friend table identification code | string |
searchLimit | Query limit (Up to 10 people) | integer |
callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
string friendCode = "string";
int searchLimit = 10;
plugin.FriendRandomSearch(friendCode, searchLimit, (state, message, rawData, dictionary) => {
if(state.Equals(Configure.PN_API_STATE_SUCCESS)) {
foreach (Dictionary<string, object> value in (ArrayList)dictionary["friends"])
{
Debug.Log(value["uuid"]);
Debug.Log(value["open_id"]);
Debug.Log(value["nickname"]);
Debug.Log(value["signin_time"]);
Debug.Log(value["signin_date"]);
}
} else {
Debug.Log("Fail");
}
});
}
}
Communication Result
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"code" : 200,
"message" : 0,
"value" : [
{
"uuid": "String",
"open_id": "String",
"nickname": "String",
"signin_time": "Integer",
"signin_date": "String"
},
]
}
Communication Result
Data Key | Description | Type |
---|---|---|
uuid | Player's unique ID | string |
open_id | Player's unique open ID | string |
nickname | Player's nickname | string |
signin_time | Time elapsed in seconds since last login | string |
signin_date | Player's last login time | string |