Use a single config for weather feed #288
Labels
No labels
bug
conflicts
documentation
DO NOT MERGE
duplicate
enhancement
good first issue
hardware
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
greg/info-orbs#288
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Instead of
I think an enum would be better, e.g.
This would look cleaner in the config.h.
then change the createWeatherFeed function to a 'switch' statement:
switch (WEATHER_FEED){
case (VISUALCROSSING): {
return new VisualCrossingFeed(WEATHER_VISUALCROSSING_API_KEY, weatherUnits);
}
case (OPENWEATHERMAP): {
return new OpenWeatherMapFeed(WEATHER_OPENWEATHERMAP_API_KEY, weatherUnits);
}
case (TEMPEST): {
return new TempestFeed(WEATHER_TEMPEST_API_KEY, weatherUnits);
}
}