diff --git a/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Client/WattTimeClient.cs b/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Client/WattTimeClient.cs index 9b17882ae..b87dda6f4 100644 --- a/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Client/WattTimeClient.cs +++ b/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Client/WattTimeClient.cs @@ -46,11 +46,11 @@ public WattTimeClient(IHttpClientFactory factory, IOptionsMonitor> GetDataAsync(string balanc var parameters = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation }, + { QueryStrings.Region, balancingAuthorityAbbreviation }, { QueryStrings.StartTime, startTime.ToUniversalTime().ToString("O", CultureInfo.InvariantCulture) }, { QueryStrings.EndTime, endTime.ToUniversalTime().ToString("O", CultureInfo.InvariantCulture) } }; var tags = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation } + { QueryStrings.Region, balancingAuthorityAbbreviation } }; using (var result = await this.MakeRequestGetStreamAsync(Paths.Data, parameters, tags)) @@ -91,12 +91,12 @@ public async Task GetCurrentForecastAsync(string balancingAuthorityAbb var parameters = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation } + { QueryStrings.Region, balancingAuthorityAbbreviation } }; var tags = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation } + { QueryStrings.Region, balancingAuthorityAbbreviation } }; var result = await this.MakeRequestGetStreamAsync(Paths.Forecast, parameters, tags); @@ -119,14 +119,14 @@ public Task GetCurrentForecastAsync(BalancingAuthority balancingAuthor var parameters = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation }, + { QueryStrings.Region, balancingAuthorityAbbreviation }, { QueryStrings.StartTime, requestedAt.ToUniversalTime().ToString("O", CultureInfo.InvariantCulture) }, { QueryStrings.EndTime, requestedAt.ToUniversalTime().ToString("O", CultureInfo.InvariantCulture) } }; var tags = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation } + { QueryStrings.Region, balancingAuthorityAbbreviation } }; using (var result = await this.MakeRequestGetStreamAsync(Paths.Forecast, parameters, tags)) { @@ -161,7 +161,7 @@ public async Task GetHistoricalDataAsync(string balancingAuthorityAbbrev var parameters = new Dictionary() { - { QueryStrings.BalancingAuthorityAbbreviation, balancingAuthorityAbbreviation } + { QueryStrings.Region, balancingAuthorityAbbreviation } }; var url = BuildUrlWithQueryString(Paths.Historical, parameters); diff --git a/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Constants/QueryStrings.cs b/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Constants/QueryStrings.cs index c9ea685e7..33f15837f 100644 --- a/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Constants/QueryStrings.cs +++ b/src/CarbonAware.DataSources/CarbonAware.DataSources.WattTime/src/Constants/QueryStrings.cs @@ -2,7 +2,7 @@ internal class QueryStrings { - public const string BalancingAuthorityAbbreviation = "ba"; + public const string Region = "region"; public const string StartTime = "start"; public const string EndTime = "end"; public const string Latitude = "latitude";