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

Fix: List Type Query Parameter for Hotel List API #203

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

siddydutta
Copy link
Contributor

Fixes #202

Previous Request URL

https://test.api.amadeus.com/v1/reference-data/locations/hotels/by-hotels?hotelIds=EAMIA276&hotelIds=EAMIAMAP

Fixed Request URL

https://test.api.amadeus.com/v1/reference-data/locations/hotels/by-hotels?hotelIds=EAMIA276%2CEAMIAMAP

Changes for this pull request

  1. Update _by_hotels.py: To flatten a list to a comma-separated string.
  2. Update test_namespaces.py: Added param to the test case.

Update _by_hotels.py

Update test_namespaces.py
@sonarcloud
Copy link

sonarcloud bot commented Sep 14, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@siddydutta
Copy link
Contributor Author

siddydutta commented Sep 14, 2023

If this is an issue across all APIs, then it would be better to implement the change here:

https://github.com/amadeus4dev/amadeus-python/blob/master/amadeus/client/request.py#L61

@tsolakoua tsolakoua self-requested a review September 20, 2023 10:03
@tsolakoua tsolakoua merged commit 9e35e61 into amadeus4dev:master Sep 20, 2023
5 checks passed
@tsolakoua
Copy link
Member

Thank you so much @siddydutta :)

@siddydutta siddydutta deleted the fix-list-query-param branch September 20, 2023 12:07
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.

Query Parameter of Type List Does Not Work As Expected
2 participants