Create Guild
Creates a guild.
Call Information
public void Create (string tableCode, string name, PointType pointType, bool isAutoJoin, int memberLimit, PlayNANOODelegate callback) {}
public void Create (string tableCode, string name, PointType pointType, bool isAutoJoin, int memberLimit, string extraData, PlayNANOODelegate callback) {}
Call Details
| Parameter | Description | Type |
|---|---|---|
| tableCode | Table code | string |
| name | Guild name | string |
| pointType | Point handling method when a guild member withdraws PlayNANOO.Guild.PointType.DELETE : Deduct points PlayNANOO.Guild.PointType.KEEP : Keep points | PointType |
| isAutoJoin | Auto-approve join requests | boolean |
| memberLimit | Maximum member limit (Max: 50) | integer |
| extraData | Additional data | string |
| callback | Communication result | PlayNANOODelegate |
Source Code
using PlayNANOO;
public class PlayNANOOExample : MonoBehaviour
{
Plugin plugin;
void Awake()
{
plugin = Plugin.GetInstance();
plugin.Guild.Create("tableCode", "name", PlayNANOO.Guild.PointType.KEEP, false, 50, (status, error, jsonString, values) => {
if (status.Equals(Configure.PN_API_STATE_SUCCESS))
{
Debug.Log(values["Uid"].ToString());
Debug.Log(values["Name"].ToString());
}
else
{
Debug.Log("Fail");
}
});
}
}
Response
HTTP/1.1 200 OK
Content-Type: application/json;charset=UTF-8
{
"Uid" : "string",
"Name" : "string"
}
Response Details
| Data Key | Description | Type |
|---|---|---|
| Uid | Guild unique ID | string |
| Uid | Guild name | string |