티스토리 뷰

반응형

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

vue3 기반으로 하는 날씨 어플리케이션을 만들어보자 api는 위의 링크에서 받아왔다. 

1. API 카테고리 클릭

 

current weather data페이지에  API doc 버튼 클릭 후 들어가면 api를 사용하는 방법들이 적혀있다.
api를 호출하는 방법은 by city name 카테고리에 들어가면  q는 도시 이름이고 apiid는 api key이다. 

2. current Weather Data 에서 subscribe 버튼 클릭
-free 의 Get API key 클릭

 

클릭하면 API keys에 key를 받아올 수 있다. (참고로 로그인해야 key 받을 수 있음)

3.로그인하고 아래의 다운로드 창에서 postman 을 사용하는 운영체제에 맞게 다운로드한다.

key값을 받아오는 것 까지 완료했다면 이 API를 실질적으로 프로젝트에서 호출해서 확인하기 전에 Postman을 통해 이 api를 어떤식으로 사용하는건지 확인해보기 위함이다.

Postman

4. current Weather Data 에서 API doc 버튼 클릭 후 by city name 카테고리에서 해당 아래 api 주소 복사

api.openweathermap.org/data/2.5/weather?q={city name}&appid={API key}

 

반응형
반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/09   »
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
글 보관함