public Task <AuthorizedGameforgeApi> Login(string email, string password, Locales locale) { return(Login(email, password, locale, GenerateIntallationId(email, password))); }
public async Task <AuthorizedGameforgeApi> Login(string email, string password, Locales locale, Guid installationId) { var request = new GameforgeRequest <AuthRequest, string>(HttpMethod.Post, "/auth/sessions", installationId); var authRequest = new AuthRequest { Locale = locale.Value, Email = email, Password = password }; Dictionary <string, string> response = await request.Send(authRequest); if (response == null) { return(null); } string authToken = response.GetValueOrDefault("token") ?? string.Empty; return(new AuthorizedGameforgeApi(authToken, installationId)); }