public CitiesWheatherService() { restClient = new RestClient(FORECAST_ENDPOINT); restClient.AddHandler("application/json", new DynamicJsonDeserializer()); restClient.AddDefaultQueryParameter("appid", API_KEY); restClient.AddDefaultQueryParameter("units", "metric"); }
protected override void OnInitialized() { client = new RestClient("https://api.openweathermap.org/").UseNewtonsoftJson(); client.AddDefaultQueryParameter("appid", ApiKey); }