PhilPJL / ImpSoft.OctopusEnergy

A .Net and .Net Core client for Octopus Energy's tariff and energy consumption API.
MIT License
10 stars 4 forks source link

Change GetGridSupplyPoints methods #5

Closed PhilPJL closed 4 years ago

PhilPJL commented 4 years ago

Change the two GetGridSupplyPoints methods for consitency

1) Change Task<IEnumerable<GridSupplyPoint>>GetGridSupplyPointsAsync(string postcode = null) to: Task<string> GetGridSupplyPointByPostcodeAsync(string postcode)

postcode is now required if 0 or >1 GSP is found throw an exception

2) Change Task<MeterPointGridSupplyPoint> GetGridSupplyPointAsync(string mpan) to Task<string> GetGridSupplyPointByMpanAsync(string mpan)

Both methods will return a GSP of the form 'A', 'B', .. 'P' (e.g. strip any leading underscore).