Notice
Recent Posts
Recent Comments
Link
250x250
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 카우치코딩
- Redux
- useSearchParams
- React state
- 자바스크립트배포
- JSON
- first-child
- 인라인블럭
- Redux store
- toString
- javascript코딩테스트
- 6주포트폴리오
- useEffect
- redux 사용방법
- foreach
- 콜백함수
- redux toolkit
- line-through
- useParams
- javascript React
- sort
- React onClick
- couchcoding
- db.json
- 협업프로젝트
- react
- 블럭요소
- 자바스크립트
- react redux
- JavaScript
Archives
- Today
- Total
개발하는 루루언니
리액트 : 날씨 api를 가져와 보쟈 본문
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