Skip to content

Client: Improve query params #28

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

drvn-mr
Copy link
Contributor

@drvn-mr drvn-mr commented Feb 12, 2025

Adds better handling of query parameters using HTTParty instead of manually.
Fills in the gaps in the supported WeatherKit query params.

Note: I should check if weather_query_for_options is still valid.
Old code.

@woodie
Copy link
Contributor

woodie commented Feb 12, 2025

Yes, and it is very difficult to mock the current implementation in specs.

Please consider compacting the options.

@drvn-mr
Copy link
Contributor Author

drvn-mr commented Feb 13, 2025

The query is only compacted when going through the passed options.
Updated tests.

@woodie
Copy link
Contributor

woodie commented Feb 14, 2025

This is a great change. I started adding some additional specs here. Feel feel to pull them over or do something else. :-)

I suppose the helper methods could to more to avoid this: [Tenkit::Utils.camel(k.to_s).to_sym

Let me know if you need me to rebase (or whatever). @drvn-mr

@drvn-mr
Copy link
Contributor Author

drvn-mr commented Feb 14, 2025

It would be much easier to just wait for these simple changes to be merged first.
You could improve using helpers afterwards.

Adds better handling of query parameters using HTTParty instead of manually.
Fills in the gaps in the supported WeatherKit query params.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants