weatherKit REST API currentWeather.conditionCode

Hello 👋

I'm looking for an official source where I can find all the values for the conditionCode enum.

I've found some repos with mapping examples, but they are different from each other. That's why I'd like to know if there's an official source.

The definition from the documentation:

conditionCode. (Required) An enumeration value indicating the condition at the time.

Answered by m5ls5e in 743622022

Haven't found that info anywhere in the REST docs... I've been using the same values they provide in the Swift docs for WeatherCondition: https://developer.apple.com/documentation/weatherkit/weathercondition

In case it's useful, I put the following Gist together previously based on the docs linked above: https://gist.github.com/mikesprague/048a93b832e2862050356ca233ef4dc1#file-weatherkit-condition-codes-ts

I used the one in Swift docs, seem to match (but it's not guaranteed I guess)

Accepted Answer

Haven't found that info anywhere in the REST docs... I've been using the same values they provide in the Swift docs for WeatherCondition: https://developer.apple.com/documentation/weatherkit/weathercondition

In case it's useful, I put the following Gist together previously based on the docs linked above: https://gist.github.com/mikesprague/048a93b832e2862050356ca233ef4dc1#file-weatherkit-condition-codes-ts

weatherKit REST API currentWeather.conditionCode
 
 
Q