You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

36 lines
902 B

  1. using System;
  2. using SUISS.Cloud.Boomlagoon.JSON;
  3. namespace SUISS.Cloud
  4. {
  5. public class PlayerNameData
  6. {
  7. public string Email { get; set; }
  8. public string Playername { get; set; }
  9. public string AccountUuid { get; set; }
  10. public bool AweberSubscription { get; set; }
  11. public string Role { get; set; }
  12. public static PlayerNameData fromJson(JSONValue json)
  13. {
  14. if (json.Type == JSONValueType.Object)
  15. {
  16. JSONObject obj = json.Obj;
  17. return new PlayerNameData
  18. {
  19. AccountUuid = JSONParse.StringField(obj, "sauId", string.Empty),
  20. Playername = JSONParse.StringField(obj, "username", string.Empty),
  21. Email = JSONParse.StringField(obj, "email", string.Empty),
  22. AweberSubscription = JSONParse.BoolField(obj, "aweberSubscription", false),
  23. Role = JSONParse.StringField(obj, "role", "player")
  24. };
  25. }
  26. return null;
  27. }
  28. }
  29. }