예제 #1
0
        /// <summary>
        /// [Synchronous] - Power Forecasts for the location
        /// </summary>
        /// <param name="client"></param>
        /// <param name="location">Location is a EPSG 4326 Latitude/Longitude position on the Earth</param>
        /// <returns></returns>
        public static GetPvPowerForecastsResponse GetPvPowerForecasts(this SolcastClient client, Location location)
        {
            var reqObj = location.ConvertTo <GetPvPowerForecasts>().PopulateWithNonDefaultValues(client.PowerOptions);
            var result = client.Get(reqObj);

            return(result.Format(client.CurrentTimeZone));
        }
        /// <summary>
        /// Radiation Latest Estimated Actuals for the location
        /// </summary>
        /// <param name="client"></param>
        /// <param name="location">Location is a EPSG 4326 Latitude/Longitude position on the Earth</param>
        /// <returns></returns>
        public static async Task <GetLatestRadiationEstimatedActualsResponse> GetLatestRadiationEstimatedActualsAsync(
            this SolcastClient client, Location location)
        {
            var result = await client.GetAsync(location.ConvertTo <GetLatestRadiationEstimatedActuals>());

            return(result.Format(client.CurrentTimeZone));
        }
예제 #3
0
        /// <summary>
        /// Power Estimated Latest Actuals for the location
        /// </summary>
        /// <param name="client"></param>
        /// <param name="location">Location is a EPSG 4326 Latitude/Longitude position on the Earth</param>
        /// <returns></returns>
        public static async Task <GetPvPowerEstimatedActualsResponse> GetLatestPvPowerEstimatedActualsAsync(this SolcastClient client, Location location)
        {
            var reqObj = location.ConvertTo <GetLatestPvPowerEstimatedActuals>().PopulateWithNonDefaultValues(client.PowerOptions);
            var result = await client.GetAsync(reqObj);

            return(result.Format(client.CurrentTimeZone));
        }
        /// <summary>
        /// [Synchronous] - Radiation Latest Estimated Actuals for the location
        /// </summary>
        /// <param name="client"></param>
        /// <param name="location">Location is a EPSG 4326 Latitude/Longitude position on the Earth</param>
        /// <returns></returns>
        public static GetLatestRadiationEstimatedActualsResponse GetLatestRadiationEstimatedActuals(this SolcastClient client, Location location)
        {
            var result = client.Get(location.ConvertTo <GetLatestRadiationEstimatedActuals>());

            return(result.Format(client.CurrentTimeZone));
        }
        /// <summary>
        /// [Synchronous] - Radiation Forecasts for the location
        /// </summary>
        /// <param name="client"></param>
        /// <param name="location">Location is a EPSG 4326 Latitude/Longitude position on the Earth</param>
        /// <returns></returns>
        public static GetRadiationForecastsResponse GetRadiationForecasts(this SolcastClient client, Location location)
        {
            var result = client.Get(location.ConvertTo <GetRadiationForecasts>());

            return(result.Format(client.CurrentTimeZone));
        }