Skip to content

Commit 2ce6fc7

Browse files
authored
fixed sample generation (#51)
- placed models in namespaces - fixed parameter references to point to correct docs sections - improved error handling for missing / invalid API key
1 parent 922e5af commit 2ce6fc7

62 files changed

Lines changed: 2345 additions & 2135 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/aggregation.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The module AggregationClient has the following available methods:
1616

1717
### GetLiveAggregations
1818
**Parameters:**
19-
[outputParameters](https://docs.solcast.com.au/#feeb0565-ac06-473a-8cd1-b1493c5bcabb "(List<string>): The output parameters to include in the response. (Optional)"), [collectionId](https://docs.solcast.com.au/#feeb0565-ac06-473a-8cd1-b1493c5bcabb "(string): Unique identifier for your collection. (Optional)"), [aggregationId](https://docs.solcast.com.au/#feeb0565-ac06-473a-8cd1-b1493c5bcabb "(string): Unique identifier that belongs to the requested collection. (Optional)"), [hours](https://docs.solcast.com.au/#feeb0565-ac06-473a-8cd1-b1493c5bcabb "(int?): The number of hours to return in the response. (Optional)"), [period](https://docs.solcast.com.au/#feeb0565-ac06-473a-8cd1-b1493c5bcabb "(string): Length of the averaging period in ISO 8601 format. (Optional)"), [format](https://docs.solcast.com.au/#feeb0565-ac06-473a-8cd1-b1493c5bcabb "(string): Response format (Optional)")
19+
[outputParameters](https://docs.solcast.com.au/#3b09628d-0f9d-4a01-aa53-9af460d6c66a "(List<string>): The output parameters to include in the response. (Optional)"), [collectionId](https://docs.solcast.com.au/#3b09628d-0f9d-4a01-aa53-9af460d6c66a "(string): Unique identifier for your collection. (Optional)"), [aggregationId](https://docs.solcast.com.au/#3b09628d-0f9d-4a01-aa53-9af460d6c66a "(string): Unique identifier that belongs to the requested collection. (Optional)"), [hours](https://docs.solcast.com.au/#3b09628d-0f9d-4a01-aa53-9af460d6c66a "(int?): The number of hours to return in the response. (Optional)"), [period](https://docs.solcast.com.au/#3b09628d-0f9d-4a01-aa53-9af460d6c66a "(string): Length of the averaging period in ISO 8601 format. (Optional)"), [format](https://docs.solcast.com.au/#3b09628d-0f9d-4a01-aa53-9af460d6c66a "(string): Response format (Optional)")
2020

2121
**Example Usage:**
2222
```csharp
@@ -36,11 +36,11 @@ Console.WriteLine(response.RawResponse);
3636

3737
| PvEstimate | Percentage | PeriodEnd | Period |
3838
| --- | --- | --- | --- |
39-
| 2155.3592 | 41.9 | 2024-11-13T05:30:00+00:00 | PT30M |
40-
| 2305.7508 | 44.8 | 2024-11-13T05:00:00+00:00 | PT30M |
39+
| 3080.0162 | 59.7 | 2024-11-22T02:00:00+00:00 | PT30M |
40+
| 3095.0167 | 59.9 | 2024-11-22T01:30:00+00:00 | PT30M |
4141
| ... | ... | ... | ... |
42-
| 1116.2304 | 21.7 | 2024-11-06T06:30:00+00:00 | PT30M |
43-
| 1132.1694 | 22.0 | 2024-11-06T06:00:00+00:00 | PT30M |
42+
| 3394.1388 | 65.9 | 2024-11-15T03:00:00+00:00 | PT30M |
43+
| 3434.4162 | 66.7 | 2024-11-15T02:30:00+00:00 | PT30M |
4444

4545
---
4646

@@ -66,10 +66,10 @@ Console.WriteLine(response.RawResponse);
6666

6767
| PvEstimate | Percentage | PeriodEnd | Period |
6868
| --- | --- | --- | --- |
69-
| 1836.6181 | 35.7 | 2024-11-13T06:00:00+00:00 | PT30M |
70-
| 1499.0824 | 29.1 | 2024-11-13T06:30:00+00:00 | PT30M |
69+
| 3027.2602 | 58.6 | 2024-11-22T02:30:00+00:00 | PT30M |
70+
| 2967.085 | 57.5 | 2024-11-22T03:00:00+00:00 | PT30M |
7171
| ... | ... | ... | ... |
72-
| 2678.5532 | 51.9 | 2024-11-20T05:00:00+00:00 | PT30M |
73-
| 2395.597 | 46.4 | 2024-11-20T05:30:00+00:00 | PT30M |
72+
| 2862.702 | 55.3 | 2024-11-29T01:30:00+00:00 | PT30M |
73+
| 2905.5262 | 56.2 | 2024-11-29T02:00:00+00:00 | PT30M |
7474

7575
---

docs/forecast.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ The module ForecastClient has the following available methods:
1717

1818
### GetRadiationAndWeather
1919
**Parameters:**
20-
[latitude](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(double?): The latitude of the location you request data for. Must be a decimal number between -90 and 90. (Required)"), [longitude](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(double?): The longitude of the location you request data for. Must be a decimal number between -180 and 180. (Required)"), [hours](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(int?): The number of hours to return in the response. (Optional)"), [period](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(string): Length of the averaging period in ISO 8601 format. (Optional)"), [tilt](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(float?): 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. (Optional)"), [azimuth](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(float?): The azimuth is defined as the angle (degrees) from true north that the PV system is facing. An azimuth of 0 means the system is facing true north. Positive values are anticlockwise, so azimuth is -90 for an east-facing system and 135 for a southwest-facing system. If you don't specify an azimuth, we use a default value of 0 (north facing) in the southern hemisphere and 180 (south-facing) in the northern hemisphere. (Optional)"), [arrayType](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(string): The type of sun-tracking or geometry configuration of your site's modules. (Optional)"), [outputParameters](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(List<string>): The output parameters to include in the response. (Optional)"), [terrainShading](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(bool?): If true, irradiance parameters are modified based on the surrounding terrain from a 90m-horizontal-resolution digital elevation model. The direct component of irradiance is set to zero when the beam from the sun is blocked by the terrain. The diffuse component of irradiance is reduced throughout the day if the sky view at the location is significantly reduced by the surrounding terrain. Global irradiance incorporates both effects. (Optional)"), [format](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(string): Response format (Optional)")
20+
[latitude](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(double?): The latitude of the location you request data for. Must be a decimal number between -90 and 90. (Required)"), [longitude](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(double?): The longitude of the location you request data for. Must be a decimal number between -180 and 180. (Required)"), [hours](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(int?): The number of hours to return in the response. (Optional)"), [period](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(string): Length of the averaging period in ISO 8601 format. (Optional)"), [tilt](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(float?): 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. (Optional)"), [azimuth](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(float?): The azimuth is defined as the angle (degrees) from true north that the PV system is facing. An azimuth of 0 means the system is facing true north. Positive values are anticlockwise, so azimuth is -90 for an east-facing system and 135 for a southwest-facing system. If you don't specify an azimuth, we use a default value of 0 (north facing) in the southern hemisphere and 180 (south-facing) in the northern hemisphere. (Optional)"), [arrayType](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(string): The type of sun-tracking or geometry configuration of your site's modules. (Optional)"), [outputParameters](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(List<string>): The output parameters to include in the response. (Optional)"), [terrainShading](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(bool?): If true, irradiance parameters are modified based on the surrounding terrain from a 90m-horizontal-resolution digital elevation model. The direct component of irradiance is set to zero when the beam from the sun is blocked by the terrain. The diffuse component of irradiance is reduced throughout the day if the sky view at the location is significantly reduced by the surrounding terrain. Global irradiance incorporates both effects. (Optional)"), [format](https://docs.solcast.com.au/#4e0e8a96-7a12-4654-8407-6bbbb37478b1 "(string): Response format (Optional)")
2121

2222
**Example Usage:**
2323
```csharp
@@ -39,17 +39,17 @@ Console.WriteLine(response.RawResponse);
3939

4040
| air_temp | dni | ghi | period_end | period |
4141
| --- | --- | --- | --- | --- |
42-
| 21 | 0 | 80 | 2024-11-13T06:00:00Z | PT30M |
43-
| 21 | 0 | 78 | 2024-11-13T06:30:00Z | PT30M |
42+
| 23 | 936 | 1003 | 2024-11-22T03:00:00Z | PT30M |
43+
| 23 | 928 | 962 | 2024-11-22T03:30:00Z | PT30M |
4444
| ... | ... | ... | ... | ... |
45-
| 19 | 0 | 267 | 2024-11-15T05:30:00Z | PT30M |
46-
| 19 | 0 | 217 | 2024-11-15T06:00:00Z | PT30M |
45+
| 26 | 941 | 1037 | 2024-11-24T02:00:00Z | PT30M |
46+
| 26 | 939 | 1027 | 2024-11-24T02:30:00Z | PT30M |
4747

4848
---
4949

5050
### GetRooftopPvPower
5151
**Parameters:**
52-
[latitude](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(double?): The latitude of the location you request data for. Must be a decimal number between -90 and 90. (Required)"), [longitude](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(double?): The longitude of the location you request data for. Must be a decimal number between -180 and 180. (Required)"), [capacity](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(float?): The capacity of the inverter (AC) or the modules (DC), whichever is greater, in kilowatts (kW). (Required)"), [hours](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(int?): The number of hours to return in the response. (Optional)"), [period](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(string): Length of the averaging period in ISO 8601 format. (Optional)"), [tilt](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(float?): 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. (Optional)"), [azimuth](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(float?): The azimuth is defined as the angle (degrees) from true north that the PV system is facing. An azimuth of 0 means the system is facing true north. Positive values are anticlockwise, so azimuth is -90 for an east-facing system and 135 for a southwest-facing system. If you don't specify an azimuth, we use a default value of 0 (north facing) in the southern hemisphere and 180 (south-facing) in the northern hemisphere. (Optional)"), [installDate](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(string): The date (yyyy-MM-dd) of installation of the PV system. We use this to estimate your loss_factor based on the ageing of your system. If you provide us with a loss_factor directly, we will ignore this date. (Optional)"), [lossFactor](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(float?): Default is 0.90 A factor to reduce your output forecast from the full capacity based on characteristics of the PV array or inverter. This is effectively the non-temperature loss effects on the nameplate rating of the PV system, including inefficiency and soiling. For a 1kW PV system anything that reduces 1000W/m2 solar radiation from producing 1000W of power output (assuming temperature is 25C). Valid values are between 0 and 1 (i.e. 0.6 equals 60%). If you specify 0.6 your returned power will be a maximum of 60% of AC capacity. (Optional)"), [outputParameters](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(List<string>): The output parameters to include in the response. (Optional)"), [terrainShading](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(bool?): If true, irradiance parameters are modified based on the surrounding terrain from a 90m-horizontal-resolution digital elevation model. The direct component of irradiance is set to zero when the beam from the sun is blocked by the terrain. The diffuse component of irradiance is reduced throughout the day if the sky view at the location is significantly reduced by the surrounding terrain. Global irradiance incorporates both effects. (Optional)"), [format](https://docs.solcast.com.au/#c68d40a1-930b-468a-afda-e2c50ae2f6b0 "(string): Response format (Optional)")
52+
[latitude](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(double?): The latitude of the location you request data for. Must be a decimal number between -90 and 90. (Required)"), [longitude](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(double?): The longitude of the location you request data for. Must be a decimal number between -180 and 180. (Required)"), [capacity](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(float?): The capacity of the inverter (AC) or the modules (DC), whichever is greater, in kilowatts (kW). (Required)"), [hours](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(int?): The number of hours to return in the response. (Optional)"), [period](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(string): Length of the averaging period in ISO 8601 format. (Optional)"), [tilt](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(float?): 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. (Optional)"), [azimuth](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(float?): The azimuth is defined as the angle (degrees) from true north that the PV system is facing. An azimuth of 0 means the system is facing true north. Positive values are anticlockwise, so azimuth is -90 for an east-facing system and 135 for a southwest-facing system. If you don't specify an azimuth, we use a default value of 0 (north facing) in the southern hemisphere and 180 (south-facing) in the northern hemisphere. (Optional)"), [installDate](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(string): The date (yyyy-MM-dd) of installation of the PV system. We use this to estimate your loss_factor based on the ageing of your system. If you provide us with a loss_factor directly, we will ignore this date. (Optional)"), [lossFactor](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(float?): Default is 0.90 A factor to reduce your output forecast from the full capacity based on characteristics of the PV array or inverter. This is effectively the non-temperature loss effects on the nameplate rating of the PV system, including inefficiency and soiling. For a 1kW PV system anything that reduces 1000W/m2 solar radiation from producing 1000W of power output (assuming temperature is 25C). Valid values are between 0 and 1 (i.e. 0.6 equals 60%). If you specify 0.6 your returned power will be a maximum of 60% of AC capacity. (Optional)"), [outputParameters](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(List<string>): The output parameters to include in the response. (Optional)"), [terrainShading](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(bool?): If true, irradiance parameters are modified based on the surrounding terrain from a 90m-horizontal-resolution digital elevation model. The direct component of irradiance is set to zero when the beam from the sun is blocked by the terrain. The diffuse component of irradiance is reduced throughout the day if the sky view at the location is significantly reduced by the surrounding terrain. Global irradiance incorporates both effects. (Optional)"), [format](https://docs.solcast.com.au/#155071c9-3457-47ea-a689-88fa894b0f51 "(string): Response format (Optional)")
5353

5454
**Example Usage:**
5555
```csharp
@@ -69,11 +69,11 @@ Console.WriteLine(response.RawResponse);
6969

7070
| pv_power_rooftop | period_end | period |
7171
| --- | --- | --- |
72-
| 0.244 | 2024-11-13T06:00:00Z | PT30M |
73-
| 0.234 | 2024-11-13T06:30:00Z | PT30M |
72+
| 3.851 | 2024-11-22T03:00:00Z | PT30M |
73+
| 3.7 | 2024-11-22T03:30:00Z | PT30M |
7474
| ... | ... | ... |
75-
| 1.059 | 2024-11-15T05:30:00Z | PT30M |
76-
| 0.846 | 2024-11-15T06:00:00Z | PT30M |
75+
| 3.915 | 2024-11-24T02:00:00Z | PT30M |
76+
| 3.879 | 2024-11-24T02:30:00Z | PT30M |
7777

7878
---
7979

@@ -97,10 +97,10 @@ Console.WriteLine(response.RawResponse);
9797

9898
| pv_power_advanced | period_end | period |
9999
| --- | --- | --- |
100-
| 0.857 | 2024-11-13T06:00:00Z | PT30M |
101-
| 0.865 | 2024-11-13T06:30:00Z | PT30M |
100+
| 10 | 2024-11-22T03:00:00Z | PT30M |
101+
| 10 | 2024-11-22T03:30:00Z | PT30M |
102102
| ... | ... | ... |
103-
| 6.599 | 2024-11-20T05:30:00Z | PT30M |
104-
| 5.916 | 2024-11-20T06:00:00Z | PT30M |
103+
| 7.991 | 2024-11-29T02:00:00Z | PT30M |
104+
| 7.977 | 2024-11-29T02:30:00Z | PT30M |
105105

106106
---

0 commit comments

Comments
 (0)