WeatherKIT REST API conditionCodes

Hello!

Does anyone knows which values can we expect in the conditionCode field of the REST API?

The documentation says it is a mandatory string. The description is: "(Required) An enumeration value indicating the condition at the time."

However, there is no list of possible values.

Checking the WeatherKIT documentation (not the REST API) I have found the documentation of WeatherCondition.

The values might be similar in the REST API, however I have no idea how they are written. In my app I have used the listed values, but soon an error occurred.

Based on the documentation I have expected the value "cloudy" but the REST API contained "Cloudy". This is not a big problem, easy to fix.

I wonder what happens with the condition codes with multiple words? E.g. mostlyClear: is it written as "Mostly clear"? OR "MostlyClear"? OR...

Does anyone have a link to the list of expected condition codes?

Thanks Viktor

Thanks for your input on the WeatherKit REST API documentation.

The condition codes returned by the REST API are written in camel case with a leading capital. In your examples, the "mostly clear" condition would be written as MostlyClear and the "cloudy" condition would be written as Cloudy.

I was looking for this info too, found this sample project which lists out the conditions to assign an icon - https://gist.github.com/jasonsnell/2757e58081a1ae377a9c0feed875976b

WeatherKIT REST API conditionCodes
 
 
Q