示例#1
0
        public Dictionary <string, object> GETDefaultOutput()
        {
            WSSolar solar = new WSSolar();
            Dictionary <string, object> result = solar.GetGCSolarOutput();

            return(result);
        }
示例#2
0
        public async Task <IActionResult> GETDefaultOutput()
        {
            WSSolar solar = new WSSolar();
            Dictionary <string, object> result = await solar.GetGCSolarOutput();

            return(new ObjectResult(result));
        }
示例#3
0
        public Dictionary <string, object> POSTCustomInput([FromBody] SolarInput input)
        {
            WSSolar solar = new WSSolar();

            if (input is null)
            {
                Dictionary <string, object> errorMsg = new Dictionary <string, object>()
                {
                    { "Input Error:", "No inputs found in the request or inputs contain invalid formatting." }
                };
                return(errorMsg);
            }
            else
            {
                Dictionary <string, object> result = solar.GetGCSolarOutput(input.input);
                return(result);
            }
        }