public HydroService(string apiKey, string apiUsername) { if (String.IsNullOrEmpty(apiKey) || String.IsNullOrEmpty(apiUsername)) { throw new FormatException(); } ApiKey = apiKey; ApiUsername = apiUsername; httpClient = new HttpClient() { BaseAddress = new Uri(BaseUrl) }; BaseParameters.Add("username", ApiUsername); BaseParameters.Add("key", ApiKey); }