Skip to content

Commit d0bddb9

Browse files
committed
Added support for full response object in archive requests
1 parent 0781df6 commit d0bddb9

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

FroniusSolarClient.Examples/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ static void GetArchiveDataOverPast24Hours(SolarClient client)
5959

6060
var data = client.GetArchiveData(DateTime.Now.AddDays(-1), DateTime.Now, channels);
6161

62-
Console.WriteLine(data);
62+
Console.WriteLine(data.Body);
6363
}
6464
#endregion
6565
}

FroniusSolarClient/Services/InverterArchiveDataService.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,10 @@ protected string BuildQueryString(int deviceId, Scope scope, SeriesType seriesTy
5252
$"&{channelParam}";
5353
}
5454

55-
public Dictionary<string, ArchiveData> GetArchiveData(DateTime startDate, DateTime endDate, List<Channel> channels, int deviceId, Scope scope, SeriesType seriesType, bool humanReadable, DeviceClass deviceClass)
55+
public Response<Dictionary<string, ArchiveData>> GetArchiveData(DateTime startDate, DateTime endDate, List<Channel> channels, int deviceId, Scope scope, SeriesType seriesType, bool humanReadable, DeviceClass deviceClass)
5656
{
5757
string baseEndpointURL = _cgi + BuildQueryString(deviceId, scope, seriesType, humanReadable, startDate, endDate, channels, deviceClass);
58-
return GetDataServiceResponse<Dictionary<string, ArchiveData>>(baseEndpointURL).Body.Data;
58+
return GetDataServiceResponse<Dictionary<string, ArchiveData>>(baseEndpointURL);
5959
}
6060
}
6161
}

FroniusSolarClient/SolarClient.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ public Response<MinMaxInverterData> GetMinMaxInverterData(int deviceId = 1, Scop
8686
/// <param name="humanReadable"></param>
8787
/// <param name="deviceClass"></param>
8888
/// <returns></returns>
89-
public Dictionary<string, ArchiveData> GetArchiveData(DateTime startDate, DateTime endDate, List<Channel> channels, int deviceId = 1, Scope scope = Scope.System, SeriesType seriesType = SeriesType.DailySum, bool humanReadable = true, DeviceClass deviceClass = DeviceClass.Inverter)
89+
public Response<Dictionary<string, ArchiveData>> GetArchiveData(DateTime startDate, DateTime endDate, List<Channel> channels, int deviceId = 1, Scope scope = Scope.System, SeriesType seriesType = SeriesType.DailySum, bool humanReadable = true, DeviceClass deviceClass = DeviceClass.Inverter)
9090
{
9191
return _inverterArchiveDataService.GetArchiveData(startDate, endDate, channels, deviceId, scope, seriesType, humanReadable, deviceClass);
9292
}

0 commit comments

Comments
 (0)