๐ค๏ธ OpenWeatherMap์ ์คํ API ์ฃผ์
https://api.openweathermap.org/data/2.5/weather
https://api.openweathermap.org/data/2.5/weather?q=Seoul&appid=YOUR_API_KEY&units=metric
q=Seoul : ๋์ ์ด๋ฆ (์: ์์ธ)appid=YOUR_API_KEY : ๋ณธ์ธ์ API ํคunits=metric : ์ญ์จ๋ก ์จ๋๋ฅผ ๋ฐ์ผ๋ ค๋ฉด metric, ํ์จ๋ imperial์ฌ์ดํธ ์ ์
๐ https://openweathermap.org/
์ค๋ฅธ์ชฝ ์๋จ์ Sign In ํด๋ฆญ
(์ด๋ฏธ ๊ณ์ ์์ผ๋ฉด ๋ก๊ทธ์ธ, ์์ผ๋ฉด Sign Up ํด๋ฆญํด์ ํ์๊ฐ์
)
ํ์๊ฐ์ ์ ์ ๋ ฅํ ๊ฒ๋ค
๋ก๊ทธ์ธ ํ ๋ค์ ํ์ด์ง๋ก ์ด๋
๐ https://home.openweathermap.org/api_keys
"Create Key" ๋๋ "API ํค ์์ฑ" ๋ฒํผ ํด๋ฆญ
weatherAppKeyYour API keys ๋ชฉ๋ก์ ๋์ดํด๋น API ํค ๋ณต์ฌํด์ ์ฌ์ฉ
https://api.openweathermap.org/data/2.5/weather?q=Seoul&appid=YOUR_API_KEY&units=metric
| ๋ถ๋ถ | ๋ป |
|---|---|
https://api.openweathermap.org/data/2.5/weather | ๐ API ๊ธฐ๋ณธ ์ฃผ์ (๋ ์จ ์กฐํ์ฉ) |
? | ๐ **์ฌ๊ธฐ๋ถํฐ๋ ์ต์ (ํ๋ผ๋ฏธํฐ)**๋ฅผ ๋ฃ๋๋ค๋ ๋ป |
q=Seoul | ๐ ๋์ ์ด๋ฆ (์ฌ๊ธฐ์ ์์ธ) |
& | ๐ ์ฌ๋ฌ ์ต์ ์ ์ด์ด๋ถ์ผ ๋ ์ |
appid=YOUR_API_KEY | ๐ ๋ค API ํค (๋ฐ๋์ ๋ฃ์ด์ผ ํจ!) |
units=metric | ๐ ์จ๋ ๋จ์: metric์ ์ญ์จ, imperial์ ํ์จ, ๊ธฐ๋ณธ์ ์ผ๋น(K) |
q=Busanunits=imperialYOUR_API_KEY ๋ถ๋ถ๋ง ๋ฐ๊พธ๋ฉด ๋๋ค.https://api.openweathermap.org/data/2.5/weather?q=Busan&appid=abc123xyz456&units=metric