개발하는 루루언니

리액트 : 날씨 api를 가져와 보쟈 본문

카테고리 없음

리액트 : 날씨 api를 가져와 보쟈

혜닝혜루 2022. 12. 15. 22:22
728x90
반응형

https://openweathermap.org/current

 

Current weather data - OpenWeatherMap

Access current weather data for any location on Earth including over 200,000 cities! We collect and process weather data from different sources such as global and local weather models, satellites, radars and a vast network of weather stations. Data is avai

openweathermap.org

날씨 api를 가져와 사용해보자. " city" 

city name 기반으로 지역에 대한 api를 가져올 수 있다. 마지막줄에 & appid={API key} 에는
회원가입하면 api키를 받을 수 있으니 받은 키를 넣어주면 된다.

 

 

 

geographic coordinates  " 위치기반 " api 가져오기

현재 위치 기반으로 인한 api 를 가져올 수 있다.
경도/위도 를 구하는것도 여기서 구할 수 있다.

 

 

 

API 키 가져오는 방법


1. 로그인후 상단에 내아이디가 보인다. 클릭해서 My API keys 를 " 클릭 " 하자

2 . 그럼 내 API Key가 나오는데 해당 api키로 사용하면 된다.

728x90