|
- using System;
- using SUISS.Cloud.Boomlagoon.JSON;
-
- namespace SUISS.Cloud
- {
- public class PlayerNameData
- {
- public string Email { get; set; }
-
- public string Playername { get; set; }
-
- public string AccountUuid { get; set; }
-
- public bool AweberSubscription { get; set; }
-
- public string Role { get; set; }
-
- public static PlayerNameData fromJson(JSONValue json)
- {
- if (json.Type == JSONValueType.Object)
- {
- JSONObject obj = json.Obj;
- return new PlayerNameData
- {
- AccountUuid = JSONParse.StringField(obj, "sauId", string.Empty),
- Playername = JSONParse.StringField(obj, "username", string.Empty),
- Email = JSONParse.StringField(obj, "email", string.Empty),
- AweberSubscription = JSONParse.BoolField(obj, "aweberSubscription", false),
- Role = JSONParse.StringField(obj, "role", "player")
- };
- }
- return null;
- }
- }
- }
|