Пример #1
0
        private async Task <AirDataResult> RunHCMAirData(string umd)
        {
            // 대기 정보 조회
            HttpClientManager hcManager = new HttpClientManager();

            return(await hcManager.RunGetAirData("http://openapi.airkorea.or.kr/openapi/services/rest/MsrstnInfoInqireSvc/getTMStdrCrdnt?", umd));
        }
Пример #2
0
        private async Task <ForecastGribResult> RunHCMForForecastGrib(string nx, string ny)
        {
            // 초단기실황조회
            HttpClientManager hcManager = new HttpClientManager();

            return(await hcManager.RunGetForecastGrib("http://newsky2.kma.go.kr/service/SecndSrtpdFrcstInfoService2/ForecastGrib?", nx, ny));
        }
Пример #3
0
        private async Task <ForecastTimeSpaceResult> RunHCMForForecastSpace(string nx, string ny)
        {
            // 동네예보조회
            HttpClientManager hcManager = new HttpClientManager();

            return(await hcManager.RunGetForecastSpace("http://newsky2.kma.go.kr/service/SecndSrtpdFrcstInfoService2/ForecastSpaceData?", nx, ny));
        }
Пример #4
0
        // address.ini에 새로운 주소 쓰기
        private async Task <bool> RunGetGPSAndConvertNxNyAndWriteAddr(string address)
        {
            HttpClientManager hcManager = new HttpClientManager();

            return(await hcManager.RunGetGPSAndConvertNxNyAndWriteAddr("http://maps.googleapis.com/maps/api/geocode/json",
                                                                       "?sensor=false&language=ko&address=",
                                                                       address));
        }
Пример #5
0
        private async Task <bool> RunGetGPSAndConvertNxNyAndWriteFI(List <string> addresses)
        {
            HttpClientManager hcManager = new HttpClientManager();

            /*
             * return await hcManager.RunGetGPSAndConvertNxNyAndWriteFI("http://maps.googleapis.com/maps/api/geocode/json",
             *                                          "?sensor=false&language=ko&address=",
             *                                          addresses);
             */
            return(await hcManager.RunGetGPSAndConvertNxNyAndWriteFI("https://maps.googleapis.com/maps/api/geocode/json",
                                                                     "?address=",
                                                                     addresses));
        }
        private async Task RunGetSearchedAddress(string searchText)
        {
            // 검색된 주소 리스트 초기화
            if (0 < listBoxSeachedAddress.Items.Count)
            {
                listBoxSeachedAddress.Items.Clear();
            }

            // 주소 검색한 결과 리스트
            HttpClientManager hcManager = new HttpClientManager();
            var result = await hcManager.RunGetSearchedAddress("https://api.poesis.kr/post/search.php?", searchText);

            foreach (var resultItem in result.results)
            {
                listBoxSeachedAddress.Items.Add(resultItem.ko_common + " " + resultItem.ko_jibeon);
            }
        }