Skip to content

Commit f105ec5

Browse files
authored
Merge pull request #194 from Solcast/sdk-update-prod-2025-11-24-8220f540
SDK Update for prod on 2025-11-24
2 parents ef35081 + 424a3d8 commit f105ec5

6 files changed

Lines changed: 36 additions & 36 deletions

File tree

src/Solcast/Clients/ForecastClient.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -381,9 +381,9 @@ public async Task<ApiResponse<ForecastsDataResponse>> GetForecastRadiationAndWea
381381
/// <param name="hours">The number of hours to return in the response. Default is 24.</param>
382382
/// <param name="period">Length of the averaging period in ISO 8601 format. Default is PT30M.</param>
383383
/// <param name="depoVelocPm10">Deposition or settling velocity of PM2.5 particulates. [m/s]. Default is 0.0009.</param>
384-
/// <param name="depoVelocPm25">Deposition or settling velocity of PM10 particulates. [m/s]. Default is 0.004.</param>
384+
/// <param name="depoVelocPm2_5">Deposition or settling velocity of PM10 particulates. [m/s]. Default is 0.004.</param>
385385
/// <param name="pm10">Restricted. A list of PM10 values. Concentration of airborne particulate matter (PM) with aerodynamicdiameter less than 10 microns. [g/m^3]. HSU endpoint will internally use Solcast's PM2.5 values tailored to your request time period.</param>
386-
/// <param name="pm25">Restricted. Concentration of airborne particulate matter (PM) with aerodynamic diameter less than 2.5 microns. [g/m^3]. HSU endpoint will internally use Solcast's PM2.5 values tailored to your request time period.</param>
386+
/// <param name="pm2_5">Restricted. Concentration of airborne particulate matter (PM) with aerodynamic diameter less than 2.5 microns. [g/m^3]. HSU endpoint will internally use Solcast's PM2.5 values tailored to your request time period.</param>
387387
/// <param name="tilt">The angle (degrees) that the PV system is tilted off the horizontal. A tilt of 0 means the system faces directly upwards, and 90 means the system is vertical and facing the horizon. If you don't specify tilt, we use a default tilt angle based on the latitude you specify in your request. Must be between 0 and 90.</param>
388388
/// <param name="cleaningThreshold">Amount of daily rainfall required to clean the panels (mm). Default is 6.0.</param>
389389
/// <param name="initialSoiling">Initial percentage of energy lost due to soiling at time zero in the rainfall series input. If not provided, Solcast will perform a ramp up series calculation to accurately determine this value. If provided must be >= 0 and < 0.3437.</param>
@@ -398,9 +398,9 @@ public async Task<ApiResponse<ForecastsDataResponse>> GetForecastHsu(
398398
int? hours = null,
399399
string period = null,
400400
double? depoVelocPm10 = null,
401-
double? depoVelocPm25 = null,
401+
double? depoVelocPm2_5 = null,
402402
List<double?> pm10 = null,
403-
List<double?> pm25 = null,
403+
List<double?> pm2_5 = null,
404404
double? tilt = null,
405405
double? cleaningThreshold = null,
406406
double? initialSoiling = null,
@@ -419,14 +419,14 @@ public async Task<ApiResponse<ForecastsDataResponse>> GetForecastHsu(
419419
if (hours.HasValue) parameters.Add("hours", hours.Value.ToString());
420420
if (period != null) parameters.Add("period", period.ToString());
421421
if (depoVelocPm10.HasValue) parameters.Add("depoVelocPm10", depoVelocPm10.Value.ToString());
422-
if (depoVelocPm25.HasValue) parameters.Add("depoVelocPm25", depoVelocPm25.Value.ToString());
423-
if (pm10 != null) parameters.Add("pm10", pm10.ToString());
424-
if (pm25 != null) parameters.Add("pm25", pm25.ToString());
422+
if (depoVelocPm2_5.HasValue) parameters.Add("depoVelocPm2_5", depoVelocPm2_5.Value.ToString());
423+
if (pm10 != null && pm10.Any()) parameters.Add("pm10", string.Join(",", pm10));
424+
if (pm2_5 != null && pm2_5.Any()) parameters.Add("pm2_5", string.Join(",", pm2_5));
425425
if (tilt.HasValue) parameters.Add("tilt", tilt.Value.ToString());
426426
if (cleaningThreshold.HasValue) parameters.Add("cleaningThreshold", cleaningThreshold.Value.ToString());
427427
if (initialSoiling.HasValue) parameters.Add("initialSoiling", initialSoiling.Value.ToString());
428428
if (rainAccumPeriod.HasValue) parameters.Add("rainAccumPeriod", rainAccumPeriod.Value.ToString());
429-
if (rainfall != null) parameters.Add("rainfall", rainfall.ToString());
429+
if (rainfall != null && rainfall.Any()) parameters.Add("rainfall", string.Join(",", rainfall));
430430
if (manualWashDates != null && manualWashDates.Any()) parameters.Add("manualWashDates", string.Join(",", manualWashDates));
431431
if (format != null) parameters.Add("format", format.ToString());
432432

@@ -462,7 +462,7 @@ public async Task<ApiResponse<ForecastsDataResponse>> GetForecastHsu(
462462
}
463463
catch (HttpRequestException httpEx)
464464
{
465-
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "timeZone=" + timeZone + ", " + "hours=" + hours + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm25=" + depoVelocPm25 + ", " + "pm10=" + pm10 + ", " + "pm25=" + pm25 + ", " + "tilt=" + tilt + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "manualWashDates=" + manualWashDates + ", " + "format=" + format;
465+
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "timeZone=" + timeZone + ", " + "hours=" + hours + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm2_5=" + depoVelocPm2_5 + ", " + "pm10=" + pm10 + ", " + "pm2_5=" + pm2_5 + ", " + "tilt=" + tilt + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "manualWashDates=" + manualWashDates + ", " + "format=" + format;
466466
var status = httpEx.StatusCode.HasValue ? ((int)httpEx.StatusCode).ToString() : "unknown";
467467
var content = httpEx.Data.Contains("Content") ? httpEx.Data["Content"] : "no content";
468468
throw new Exception($@"HTTP error in GetForecastHsu
@@ -473,7 +473,7 @@ public async Task<ApiResponse<ForecastsDataResponse>> GetForecastHsu(
473473
}
474474
catch (Exception ex)
475475
{
476-
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "timeZone=" + timeZone + ", " + "hours=" + hours + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm25=" + depoVelocPm25 + ", " + "pm10=" + pm10 + ", " + "pm25=" + pm25 + ", " + "tilt=" + tilt + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "manualWashDates=" + manualWashDates + ", " + "format=" + format;
476+
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "timeZone=" + timeZone + ", " + "hours=" + hours + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm2_5=" + depoVelocPm2_5 + ", " + "pm10=" + pm10 + ", " + "pm2_5=" + pm2_5 + ", " + "tilt=" + tilt + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "manualWashDates=" + manualWashDates + ", " + "format=" + format;
477477
throw new Exception($@"Unhandled error in GetForecastHsu
478478
Parameters: {paramDetails}
479479
Error: {ex.Message}", ex);

src/Solcast/Clients/HistoricClient.cs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -334,9 +334,9 @@ public async Task<ApiResponse<HistoricPvPowerResponse>> GetHistoricRooftopPvPowe
334334
/// <param name="timeZone">Timezone to return in data set. Accepted values are utc, longitudinal, or a range from -13 to 13 in 0.25 hour increments for utc offset. Default is utc.</param>
335335
/// <param name="period">Length of the averaging period in ISO 8601 format. Default is PT30M.</param>
336336
/// <param name="depoVelocPm10">Deposition or settling velocity of PM2.5 particulates. [m/s]. Default is 0.0009.</param>
337-
/// <param name="depoVelocPm2.5">Deposition or settling velocity of PM10 particulates. [m/s]. Default is 0.004.</param>
337+
/// <param name="depoVelocPm2_5">Deposition or settling velocity of PM10 particulates. [m/s]. Default is 0.004.</param>
338338
/// <param name="pm10">Restricted. A list of PM10 values. Concentration of airborne particulate matter (PM) with aerodynamicdiameter less than 10 microns. [g/m^3]. HSU endpoint will internally use Solcast's PM2.5 values tailored to your request time period.</param>
339-
/// <param name="pm2.5">Restricted. Concentration of airborne particulate matter (PM) with aerodynamic diameter less than 2.5 microns. [g/m^3]. HSU endpoint will internally use Solcast's PM2.5 values tailored to your request time period.</param>
339+
/// <param name="pm2_5">Restricted. Concentration of airborne particulate matter (PM) with aerodynamic diameter less than 2.5 microns. [g/m^3]. HSU endpoint will internally use Solcast's PM2.5 values tailored to your request time period.</param>
340340
/// <param name="tilt">The angle (degrees) that the PV system is tilted off the horizontal. A tilt of 0 means the system faces directly upwards, and 90 means the system is vertical and facing the horizon. If you don't specify tilt, we use a default tilt angle based on the latitude you specify in your request. Must be between 0 and 90.</param>
341341
/// <param name="start">ISO_8601 compliant starting datetime for the historical data. If the supplied value does not specify a timezone, the timezone will be inferred from the time_zone parameter, if supplied. Otherwise UTC is assumed.</param>
342342
/// <param name="duration">Must include one of end_date and duration. ISO_8601 compliant duration for the historical data. Must be within 31 days of the start_date.</param>
@@ -354,9 +354,9 @@ public async Task<ApiResponse<EstimatedActualsDataResponse>> GetHistoricHsu(
354354
string timeZone = null,
355355
string period = null,
356356
double? depoVelocPm10 = null,
357-
double? depoVelocPm2.5 = null,
357+
double? depoVelocPm2_5 = null,
358358
List<double?> pm10 = null,
359-
List<double?> pm2.5 = null,
359+
List<double?> pm2_5 = null,
360360
double? tilt = null,
361361
string duration = null,
362362
string end = null,
@@ -377,17 +377,17 @@ public async Task<ApiResponse<EstimatedActualsDataResponse>> GetHistoricHsu(
377377
if (timeZone != null) parameters.Add("timeZone", timeZone.ToString());
378378
if (period != null) parameters.Add("period", period.ToString());
379379
if (depoVelocPm10.HasValue) parameters.Add("depoVelocPm10", depoVelocPm10.Value.ToString());
380-
if (depoVelocPm2.5.HasValue) parameters.Add("depoVelocPm2.5", depoVelocPm2.5.Value.ToString());
381-
if (pm10 != null) parameters.Add("pm10", pm10.ToString());
382-
if (pm2.5 != null) parameters.Add("pm2.5", pm2.5.ToString());
380+
if (depoVelocPm2_5.HasValue) parameters.Add("depoVelocPm2.5", depoVelocPm2_5.Value.ToString());
381+
if (pm10 != null && pm10.Any()) parameters.Add("pm10", string.Join(",", pm10));
382+
if (pm2_5 != null && pm2_5.Any()) parameters.Add("pm2.5", string.Join(",", pm2_5));
383383
if (tilt.HasValue) parameters.Add("tilt", tilt.Value.ToString());
384384
if (duration != null) parameters.Add("duration", duration.ToString());
385385
if (end != null) parameters.Add("end", end.ToString());
386386
if (cleaningThreshold.HasValue) parameters.Add("cleaningThreshold", cleaningThreshold.Value.ToString());
387387
if (initialSoiling.HasValue) parameters.Add("initialSoiling", initialSoiling.Value.ToString());
388388
if (manualWashDates != null && manualWashDates.Any()) parameters.Add("manualWashDates", string.Join(",", manualWashDates));
389389
if (rainAccumPeriod.HasValue) parameters.Add("rainAccumPeriod", rainAccumPeriod.Value.ToString());
390-
if (rainfall != null) parameters.Add("rainfall", rainfall.ToString());
390+
if (rainfall != null && rainfall.Any()) parameters.Add("rainfall", string.Join(",", rainfall));
391391
if (format != null) parameters.Add("format", format.ToString());
392392

393393
var queryString = string.Join("&", parameters.Select(p => $"{p.Key}={Uri.EscapeDataString(p.Value ?? string.Empty)}"));
@@ -422,7 +422,7 @@ public async Task<ApiResponse<EstimatedActualsDataResponse>> GetHistoricHsu(
422422
}
423423
catch (HttpRequestException httpEx)
424424
{
425-
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "start=" + start + ", " + "timeZone=" + timeZone + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm2.5=" + depoVelocPm2.5 + ", " + "pm10=" + pm10 + ", " + "pm2.5=" + pm2.5 + ", " + "tilt=" + tilt + ", " + "duration=" + duration + ", " + "end=" + end + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "manualWashDates=" + manualWashDates + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "format=" + format;
425+
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "start=" + start + ", " + "timeZone=" + timeZone + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm2_5=" + depoVelocPm2_5 + ", " + "pm10=" + pm10 + ", " + "pm2_5=" + pm2_5 + ", " + "tilt=" + tilt + ", " + "duration=" + duration + ", " + "end=" + end + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "manualWashDates=" + manualWashDates + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "format=" + format;
426426
var status = httpEx.StatusCode.HasValue ? ((int)httpEx.StatusCode).ToString() : "unknown";
427427
var content = httpEx.Data.Contains("Content") ? httpEx.Data["Content"] : "no content";
428428
throw new Exception($@"HTTP error in GetHistoricHsu
@@ -433,7 +433,7 @@ public async Task<ApiResponse<EstimatedActualsDataResponse>> GetHistoricHsu(
433433
}
434434
catch (Exception ex)
435435
{
436-
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "start=" + start + ", " + "timeZone=" + timeZone + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm2.5=" + depoVelocPm2.5 + ", " + "pm10=" + pm10 + ", " + "pm2.5=" + pm2.5 + ", " + "tilt=" + tilt + ", " + "duration=" + duration + ", " + "end=" + end + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "manualWashDates=" + manualWashDates + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "format=" + format;
436+
var paramDetails = "latitude=" + latitude + ", " + "longitude=" + longitude + ", " + "start=" + start + ", " + "timeZone=" + timeZone + ", " + "period=" + period + ", " + "depoVelocPm10=" + depoVelocPm10 + ", " + "depoVelocPm2_5=" + depoVelocPm2_5 + ", " + "pm10=" + pm10 + ", " + "pm2_5=" + pm2_5 + ", " + "tilt=" + tilt + ", " + "duration=" + duration + ", " + "end=" + end + ", " + "cleaningThreshold=" + cleaningThreshold + ", " + "initialSoiling=" + initialSoiling + ", " + "manualWashDates=" + manualWashDates + ", " + "rainAccumPeriod=" + rainAccumPeriod + ", " + "rainfall=" + rainfall + ", " + "format=" + format;
437437
throw new Exception($@"Unhandled error in GetHistoricHsu
438438
Parameters: {paramDetails}
439439
Error: {ex.Message}", ex);

0 commit comments

Comments
 (0)