/// <summary>
        ///     A nowcast call provides forecasting data on a minute-­by-­minute basis.
        /// </summary>
        /// <param name="latitude">Latitude to request data for in decimal degrees, -87 to 89.</param>
        /// <param name="longitude">Longitude to request data for in decimal degrees, -180 to 180.</param>
        /// <param name="fields">Fields to request from climacell.</param>
        /// <param name="paramters">Optional request paramaters <see cref="OptionalParamters"/>.</param>
        /// <returns>A climacell <see cref="Nowcast"/> response.</returns>
        public async Task <Nowcast> GetNowcast(double latitude, double longitude, List <string> fields, OptionalParamters paramters = null)
        {
            if (fields.Count <= 0)
            {
                throw new ArgumentException($"{nameof(fields)} cannot be empty.");
            }

            var query    = BuildRequestUri(latitude, longitude, fields, paramters, Endpoint.NowCast);
            var response = await httpClient.HttpRequestAsync($"{baseUri}{query}").ConfigureAwait(false);

            return(await Nowcast.Deserialize(response, jsonSerializerService));
        }
        /// <summary>
        ///     Build a request uri for a climacell weather endpoint.
        /// </summary>
        /// <param name="latitude">Latitude to request data for in decimal degrees.</param>
        /// <param name="longitude">Longitude to request data for in decimal degrees.</param>
        /// <param name="fields">Fields to request from climacell.</param>
        /// <param name="paramters">Optional request paramaters <see cref="OptionalParamters"/>.</param>
        /// <param name="endPoint">Target endpoint.</param>
        /// <returns>A uri constructed for use with climacells' 3.0 api.</returns>
        private string BuildRequestUri(double latitude, double longitude, List <string> fields, OptionalParamters paramters, string endPoint)
        {
            var fieldString = Uri.EscapeUriString(string.Join(",", fields));
            var queryString = new StringBuilder($"{endPoint}?");

            queryString.Append(Invariant($"lat={latitude:N4}&lon={longitude:N4}"));
            queryString.Append($"&fields={fieldString}");
            queryString.Append($"&apikey={this.apiKey}");

            if (paramters?.ForecastStartTime != null)
            {
                queryString.Append($"&start_time={paramters.ForecastStartTime.Value.ToUniversalTime().ToString("s", CultureInfo.InvariantCulture)}");
            }

            if (paramters?.ForecastEndTime != null)
            {
                queryString.Append($"&end_time={paramters.ForecastEndTime.Value.ToUniversalTime().ToString("s", CultureInfo.InvariantCulture)}");
            }

            if (paramters?.NowcastTimeStep != null)
            {
                queryString.Append($"&timestep={paramters.NowcastTimeStep}");
            }

            if (!string.IsNullOrWhiteSpace(paramters?.UnitSystem))
            {
                queryString.Append($"&unit_system={paramters.UnitSystem}");
            }

            return(queryString.ToString());
        }