Conversation
…ngredients, renamed parameters and tookout the offset value
lillykml
commented
Sep 2, 2021
Collaborator
Author
lillykml
left a comment
There was a problem hiding this comment.
Btw I'm not sure what the second commit means the merge branch master, so pls make sure I don't break anything :D - I don't remember merging anything tbh
| # This is a bit risky in cases where less recipes were found than the offset value; | ||
| # --> the API is then returning no recipes. | ||
| "offset": offset} | ||
| #"offset": offset |
Collaborator
There was a problem hiding this comment.
I added this for good reasons: to get (hopefully) different results every time the user is clicking the button. Without the offset, the user will always see the same recipes when no options are changed.
Collaborator
|
I'm surprised that the API has an issue with something like "tomatoe, " since it expects the parameter here as. comma-separated value anyway.. however, if it works more reliable that way I'm fine with it. The offset parameter, however, would I prefer to keep. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I had the issue that I didn't get any recipes if I didn't add additional ingredients. Then I saw that we join them basically like this f"{list_a}", {list_b}" which gives results like "tomato, "
Also I took out the offset parameter to get better results, since we anyway display only 3 results