Last active
August 15, 2025 19:25
-
-
Save mikesprague/048a93b832e2862050356ca233ef4dc1 to your computer and use it in GitHub Desktop.
Revisions
-
mikesprague revised this gist
Jan 4, 2023 . No changes.There are no files selected for viewing
-
mikesprague revised this gist
Jan 4, 2023 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ // WeatherKit REST API documentation lists `conditionCode` as a property returned for // various DataSets and says it's an enumeration value // (e.g. https://developer.apple.com/documentation/weatherkitrestapi/currentweather/currentweatherdata) // but never says what the possible return values could be anywhere in the REST API docs // // The following was created from info in the Swift documentation: https://developer.apple.com/documentation/weatherkit/weathercondition -
mikesprague revised this gist
Jan 4, 2023 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,7 +2,7 @@ // various DataSets and says it's an enumeration value (e.g. https://developer.apple.com/documentation/weatherkitrestapi/currentweather/currentweatherdata) // but never says what the possible return values could be anywhere in the REST API docs // // The following was created from info in the Swift documentation: https://developer.apple.com/documentation/weatherkit/weathercondition export interface ConditionCode { code: string; -
mikesprague revised this gist
Jan 4, 2023 . 1 changed file with 13 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,6 +4,19 @@ // // The following list was created from info in the Swift documentation: https://developer.apple.com/documentation/weatherkit/weathercondition export interface ConditionCode { code: string; description: string; type: | 'visibility' | 'wind' | 'precipitation' | 'hazardous' | 'winter-precipitation' | 'hazardous-winter' | 'tropical-hazard'; } export const conditionCodes: ConditionCode[] = [ { code: 'BlowingDust', @@ -178,15 +191,3 @@ export const conditionCodes: ConditionCode[] = [ }, ]; -
mikesprague revised this gist
Jan 4, 2023 . 1 changed file with 3 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,8 @@ // WeatherKit REST API documentation lists `conditionCode` as a property returned for // various DataSets and says it's an enumeration value (e.g. https://developer.apple.com/documentation/weatherkitrestapi/currentweather/currentweatherdata) // but never says what the possible return values could be anywhere in the REST API docs // // The following list was created from info in the Swift documentation: https://developer.apple.com/documentation/weatherkit/weathercondition export const conditionCodes: ConditionCode[] = [ { -
mikesprague created this gist
Jan 4, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,194 @@ // WeatherKit REST API documentation lists `conditionCode` as a property returned for // various DataSets but and says it's an enumeration value // (e.g. https://developer.apple.com/documentation/weatherkitrestapi/currentweather/currentweatherdata) // but never says what the possible return valuers are anywhere in the REST API docs // // The following list was created from the info in the Swift documentation: // https://developer.apple.com/documentation/weatherkit/weathercondition export const conditionCodes: ConditionCode[] = [ { code: 'BlowingDust', description: 'Blowing dust or sandstorm', type: 'visibility', }, { code: 'Clear', description: 'Clear', type: 'visibility', }, { code: 'Cloudy', description: 'Cloudy, overcast conditions', type: 'visibility', }, { code: 'Foggy', description: 'Fog', type: 'visibility', }, { code: 'Haze', description: 'Haze', type: 'visibility', }, { code: 'MostlyClear', description: 'Mostly clear', type: 'visibility', }, { code: 'MostlyCloudy', description: 'Mostly cloudy', type: 'visibility', }, { code: 'PartlyCloudy', description: 'Partly cloudy', type: 'visibility', }, { code: 'Smoky', description: 'Smoky', type: 'visibility', }, { code: 'Breezy', description: 'Breezy, light wind', type: 'wind', }, { code: 'Windy', description: 'Windy', type: 'wind', }, { code: 'Drizzle', description: 'Drizzle or light rain', type: 'precipitation', }, { code: 'HeavyRain', description: 'Heavy rain', type: 'precipitation', }, { code: 'IsolatedThunderstorms', description: 'Thunderstorms covering less than 1/8 of the forecast area', type: 'precipitation', }, { code: 'Rain', description: 'Rain', type: 'precipitation', }, { code: 'SunShowers', description: 'Rain with visible sun', type: 'precipitation', }, { code: 'ScatteredThunderstorms', description: 'Numerous thunderstorms spread across up to 50% of the forecast area', type: 'precipitation', }, { code: 'StrongStorms', description: 'Notably strong thunderstorms', type: 'precipitation', }, { code: 'Thunderstorms', description: 'Thunderstorms', type: 'precipitation', }, { code: 'Frigid', description: 'Frigid conditions, low temperatures, or ice crystals', type: 'hazardous', }, { code: 'Hail', description: 'Hail', type: 'hazardous', }, { code: 'Hot', description: 'High temperatures', type: 'hazardous', }, { code: 'Flurries', description: 'Flurries or light snow', type: 'winter-precipitation', }, { code: 'Sleet', description: 'Sleet', type: 'winter-precipitation', }, { code: 'Snow', description: 'Snow', type: 'winter-precipitation', }, { code: 'SunFlurries', description: 'Snow flurries with visible sun', type: 'winter-precipitation', }, { code: 'WintryMix', description: 'Wintry mix', type: 'winter-precipitation', }, { code: 'Blizzard', description: 'Blizzard', type: 'hazardous-winter', }, { code: 'BlowingSnow', description: 'Blowing or drifting snow', type: 'hazardous-winter', }, { code: 'FreezingDrizzle', description: 'Freezing drizzle or light rain', type: 'hazardous-winter', }, { code: 'FreezingRain', description: 'Freezing rain', type: 'hazardous-winter', }, { code: 'HeavySnow', description: 'Heavy snow', type: 'hazardous-winter', }, { code: 'Hurricane', description: 'Hurricane', type: 'tropical-hazard', }, { code: 'TropicalStorm', description: 'Tropical storm', type: 'tropical-hazard', }, ]; export interface ConditionCode { code: string; description: string; type: | 'visibility' | 'wind' | 'precipitation' | 'hazardous' | 'winter-precipitation' | 'hazardous-winter' | 'tropical-hazard'; }