Skip to content

Client: Improve query params#28

Open
drvn-mr wants to merge 1 commit into
superbasicxyz:mainfrom
drvn-mr:improve_params
Open

Client: Improve query params#28
drvn-mr wants to merge 1 commit into
superbasicxyz:mainfrom
drvn-mr:improve_params

Conversation

@drvn-mr

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

Copy link
Copy Markdown
Contributor

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

woodie commented Feb 12, 2025

Copy link
Copy Markdown
Contributor

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

Please consider compacting the options.

@drvn-mr

drvn-mr commented Feb 13, 2025

Copy link
Copy Markdown
Contributor Author

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

@woodie

woodie commented Feb 14, 2025

Copy link
Copy Markdown
Contributor

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

drvn-mr commented Feb 14, 2025

Copy link
Copy Markdown
Contributor Author

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