MSN weather API list of conditions?

前端 未结 5 2078
忘了有多久
忘了有多久 2020-12-23 23:42

Microsoft has a weather API very similar to Google\'s (which now appears to be completely dead). I\'ve converted one of my applications over to their feed, but I\'ve been un

5条回答
  •  自闭症患者
    2020-12-24 00:17

    I decided to go a slightly different route and figure out conditions based on the icon provided (skycode and skycodeday) from the XML.

    Here is a list of what I came up with. Hopefully it will be helpful for others in migrating from Google's weather API:

    • 0, 1 ,2, 3 ,4, 17, 35 - Thunderstorm
    • 5 - Rain/Snow mix
    • 6 - Sleet/Snow mix
    • 7 - Rain/Snow/Sleet mix
    • 8,9 - Icy
    • 10 - Rain/Sleet mix
    • 11 - Light Rain
    • 12 - Rain
    • 13 - Light Snow
    • 14,16,42,43 - Snow
    • 15 - Blizzard
    • 18,40 - Showers
    • 19 - Dust
    • 20 - Fog
    • 21 - Haze
    • 22 - Smoke
    • 23,24 - Windy
    • 25 - Frigid
    • 26 - Cloudy
    • 27,29,33 - Partly Cloudy (night)
    • 28,30,34 - Partly Cloudy
    • 31 - Clear (night)
    • 32 - Clear
    • 36 - Hot
    • 37,38 - Scattered Thunderstorms
    • 39 - Scattered Showers
    • 41 - Scattered Snow Showers
    • 44 - N/A
    • 45 - Scattered Rain Showers (night)
    • 46 - Scattered Snow Showers (night)
    • 47 - Scattered Thunderstorms (night)

提交回复
热议问题