/// <summary> /// Initialises a new instance of the request with the given description. /// </summary> /// /// <param name="desc">The description.</param> /// <param name="gameToken">The Game to log in to.</param> public LogInUsingEmailRequest(LogInUsingEmailRequestDesc desc, string gameToken) { ReleaseAssert.IsNotNull(desc, "A description object cannot be null."); ReleaseAssert.IsNotNull(desc.Email, "Email cannot be null."); ReleaseAssert.IsNotNull(desc.Password, "Password cannot be null."); ReleaseAssert.IsNotNull(gameToken, "Game Token cannot be null."); Email = desc.Email; Password = desc.Password; DeviceModel = desc.DeviceModel; if (desc.DeviceType == null) { DeviceType = DeviceTypeDefaultProvider.GetDefault(); } else { DeviceType = desc.DeviceType; } if (desc.Platform == null) { Platform = PlatformDefaultProvider.GetDefault(); } else { Platform = desc.Platform; } AppVersion = desc.AppVersion; GameToken = gameToken; Date = DateTime.Now; Url = "https://connect.chilliconnect.com/1.0/player/login/email"; HttpRequestMethod = HttpRequestMethod.Post; }
/// <summary> /// Initialises a new instance of the request with the given description. /// </summary> /// /// <param name="desc">The description.</param> /// <param name="gameToken">The Game to log in to.</param> public LogInUsingEmailRequest(LogInUsingEmailRequestDesc desc, string gameToken) { ReleaseAssert.IsNotNull(desc, "A description object cannot be null."); ReleaseAssert.IsNotNull(desc.Email, "Email cannot be null."); ReleaseAssert.IsNotNull(desc.Password, "Password cannot be null."); ReleaseAssert.IsNotNull(gameToken, "Game Token cannot be null."); Email = desc.Email; Password = desc.Password; DeviceModel = desc.DeviceModel; DeviceType = desc.DeviceType; Platform = desc.Platform; GameToken = gameToken; Url = "https://connect.chilliconnect.com/1.0/player/login/email"; HttpRequestMethod = HttpRequestMethod.Post; }