Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor weather forecast functions #42

Closed
csparpa opened this issue Oct 12, 2014 · 1 comment
Closed

Refactor weather forecast functions #42

csparpa opened this issue Oct 12, 2014 · 1 comment
Assignees
Milestone

Comments

@csparpa
Copy link
Owner

csparpa commented Oct 12, 2014

This will affect version 3.0 as it is a breaking change in the library API.

We need to normalise the weather retrieval functions to the naming pattern:

  • forecast_at_place(self, name, forecast_granularity, [limit])
  • forecast_at_coords(self, lat, lon, forecast_granularity, [limit])
  • forecast_at_id(self, id, forecast_granularity, [limit])

where "forecast_granularity" can be either "3h" or "daily"

@csparpa csparpa self-assigned this Nov 11, 2014
@csparpa csparpa added this to the Release 3.0 milestone Dec 24, 2014
@csparpa
Copy link
Owner Author

csparpa commented Jul 11, 2019

# OLD SIGNATURE                                        # NEW SIGNATURE
three_hours_forecast(self, name)                       --> forecast_at_place(self, name, "3h", [limit])
daily_forecast(self, name, limit=None)                 --> forecast_at_place(self, name, "daily", [limit])

three_hours_forecast_at_coords(self, lat, lon)         --> forecast_at_coords(self, lat, lon, "3h", [limit])
daily_forecast_at_coords(self, lat, lon, limit=None)   --> forecast_at_coords(self, lat, lon, "daily", [limit])

three_hours_forecast_at_id(self, id)                   --> forecast_at_id(self, id, "3h", [limit])
daily_forecast_at_id(self, id, limit=None)             --> forecast_at_id(self, id, "daily", [limit])

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant