You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: casdk-docs/docs/architecture/decisions/0016-watt-time-v3.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -38,7 +38,7 @@ The following is configured at `CarbonAware.DataSources.WattTime/src/Constants/
38
38
| Forecast | Get forecast| /forecast | /forecast | **TODO: CHECK IMPACT** <br> No longer be used for historical data <br> _Request_ <li> `ba` is now `region` <li> `extended_forecast` removed <li> `horizon_hours` added <li> `signal_type` added <li> Historical forecasts are now at `/forecast/historical` <br> _Response_ <li> `signal_type` added
39
39
| Historical | Get historical forecast data | /historical (?) | /forecast/historical (?) | **We need to validate why historical was being used for the API, and what historical used to be, and whether this should be the new /forecast/historical or not.**
40
40
| Balancing Authority From Location | Get balancing authority from location | /ba-from-loc | /region-from-loc | Check if the CA SDK uses BA at all <br><br> _Request_ <li> `name` is now `region_full_name` <li> `abbrev` is now `region` <li> `signal_type` added <br> _Response_ <li> `id` removed <li> `signal_type` added |
41
-
| Login | User login | https://api2.watttime.org/v2/login | https://api.watttime.org/login | Path has changed from being version specific to being no longer related to the API version. <br><br> **TODO: CHECK HOW BASE URL IS DEFINED AS THIS WILL NOW HAVE DIFFERENT VALUES**
41
+
| Login | User login | https://api2.watttime.org/v2/login | https://api.watttime.org/login | Path has changed from being version specific to being no longer related to the API version. <br><br> NOTE: Updated in wattTime client to now have 2 HTTP clients to decouple versions from the login.
/// <param name="endTime">End time of the time period</param>
19
19
/// <returns>An <see cref="Task{IEnumerable}{GridEmissionDataPoint}"/> which contains all emissions data points in a period.</returns>
20
20
/// <exception cref="WattTimeClientException">Can be thrown when errors occur connecting to WattTime client. See the WattTimeClientException class for documentation of expected status codes.</exception>
/// <param name="endTime">End time of the time period</param>
29
29
/// <returns>An <see cref="Task{IEnumerable}{GridEmissionDataPoint}"/> which contains all emissions data points in a period.</returns>
30
30
/// <exception cref="WattTimeClientException">Can be thrown when errors occur connecting to WattTime client. See the WattTimeClientException class for documentation of expected status codes.</exception>
/// <returns>An <see cref="Task{Forecast}"/> which contains forecasted emissions data points.</returns>
46
46
/// <exception cref="WattTimeClientException">Can be thrown when errors occur connecting to WattTime client. See the WattTimeClientException class for documentation of expected status codes.</exception>
/// <param name="requestedAt">The historical time used to fetch the most recent forecast generated as of that time.</param>
63
63
/// <returns>An <see cref="Task{Forecast}"/> which contains forecasted emissions data points or null if no Forecast generated at the requested time.</returns>
64
64
/// <exception cref="WattTimeClientException">Can be thrown when errors occur connecting to WattTime client. See the WattTimeClientException class for documentation of expected status codes.</exception>
/// <param name="longitude">Longitude of the location</param>
72
72
/// <returns>An <see cref="Task{BalancingAuthority}"/> which contains the balancing authority details.</returns>
73
73
/// <exception cref="WattTimeClientException">Can be thrown when errors occur connecting to WattTime client. See the WattTimeClientException class for documentation of expected status codes.</exception>
/// <returns>An <see cref="Task{Stream}"/> which contains the data Stream of the .zip file.</returns>
98
98
/// <exception cref="WattTimeClientException">Can be thrown when errors occur connecting to WattTime client. See the WattTimeClientException class for documentation of expected status codes.</exception>
returnawaitJsonSerializer.DeserializeAsync<List<GridEmissionDataPoint>>(result,_options)??thrownewWattTimeClientException($"Error getting forecasts for {balancingAuthorityAbbreviation}");
77
+
returnawaitJsonSerializer.DeserializeAsync<GridEmissionsDataResponse>(result,_options)??thrownewWattTimeClientException($"Error getting forecasts for {regionAbbreviation}");
varforecast=awaitJsonSerializer.DeserializeAsync<Forecast?>(result,_options)??thrownewWattTimeClientException($"Error getting forecast for {balancingAuthorityAbbreviation}");
106
+
varsr=newStreamReader(result);
107
+
vars=sr.ReadToEnd();
108
+
109
+
varforecast=awaitJsonSerializer.DeserializeAsync<Forecast?>(result,_options)??thrownewWattTimeClientException($"Error getting forecast for {region}");
varbaValue=awaitJsonSerializer.DeserializeAsync<BalancingAuthority>(result,_options)??thrownewWattTimeClientException($"Error getting Balancing Authority for latitude {latitude} and longitude {longitude}");
317
+
varbaValue=awaitJsonSerializer.DeserializeAsync<RegionResponse>(result,_options)??thrownewWattTimeClientException($"Error getting Balancing Authority for latitude {latitude} and longitude {longitude}");
Copy file name to clipboardExpand all lines: src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Configuration/WattTimeClientConfiguration.cs
+1-1
Original file line number
Diff line number
Diff line change
@@ -23,7 +23,7 @@ internal class WattTimeClientConfiguration
23
23
/// <summary>
24
24
/// Gets or sets the base url to use when connecting to WattTime
0 commit comments