public static void SendModeration(string targetUserId, ModerationType mType, string reason, ModerationTimeRange expires, string worldId = "", string worldInstanceId = "", Action <ApiModelContainer <ApiModeration> > successCallback = null, Action <ApiModelContainer <ApiModeration> > errorCallback = null) { ApiModeration apiModeration = new ApiModeration(targetUserId); apiModeration.moderationType = mType; apiModeration.reasonMessage = reason; apiModeration.worldId = worldId; apiModeration.instanceId = worldInstanceId; apiModeration.expiresRange = expires; ApiModeration apiModeration2 = apiModeration; apiModeration2.Save(delegate(ApiContainer c) { if (successCallback != null) { successCallback(c as ApiModelContainer <ApiModeration>); } }, delegate(ApiContainer c) { if (errorCallback != null) { errorCallback(c as ApiModelContainer <ApiModeration>); } }); }
public static void DeleteModeration(string targetUserId, string moderationId, Action successCallback, Action <string> errorCallback) { ApiModeration apiModeration = new ApiModeration(targetUserId, "moderations/" + moderationId); apiModeration.Delete(delegate { if (successCallback != null) { successCallback(); } }, delegate(ApiContainer c) { if (errorCallback != null) { errorCallback(c.Error); } }); }
public static void SendVoteKick(string targetUserId, string worldId = "", string worldInstanceId = "", Dictionary <string, object> details = null, Action successCallback = null, Action <string> errorCallback = null) { ApiModeration apiModeration = new ApiModeration(targetUserId, "votekick"); apiModeration.details = details; apiModeration.worldId = worldId; apiModeration.instanceId = worldInstanceId; ApiModeration apiModeration2 = apiModeration; apiModeration2.Save(delegate { if (successCallback != null) { successCallback(); } }, delegate(ApiContainer c) { if (errorCallback != null) { errorCallback(c.Error); } }); }