Add ETo AdjustmentMethod

This commit is contained in:
Matthew Oslan
2019-06-11 19:10:32 -04:00
parent 7e2d3458fd
commit 3e0141cdac
5 changed files with 334 additions and 8 deletions

View File

@@ -1,4 +1,5 @@
import { GeoCoordinates, WateringData, WeatherData } from "../../types";
import { EToData } from "../adjustmentMethods/EToAdjustmentMethod";
export class WeatherProvider {
/**
@@ -22,4 +23,15 @@ export class WeatherProvider {
getWeatherData( coordinates : GeoCoordinates ): Promise< WeatherData > {
throw "Selected WeatherProvider does not support getWeatherData";
}
/**
* Retrieves the data necessary for calculating potential ETo.
* @param coordinates The coordinates to retrieve the data for.
* @return A Promise that will be resolved with the EToData if it is successfully retrieved,
* or rejected with an error message if an error occurs while retrieving the EToData or the WeatherProvider does
* not support this method.
*/
getEToData( coordinates: GeoCoordinates ): Promise< EToData > {
throw "Selected WeatherProvider does not support getEToData";
};
}