Coding test - Chuong Huynh #7
Open
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.
Overview
Please write the overview about this PR.
What's in this PR:
0. Authentication
The authentication will be needed in some actions, like Rating, List Recipes...
oauth_applicationsand 2 users;client_id,client_secrete, which areuid,secreteinoauth_applications1. Search recipes:
/api/recipeshas been updated to have filter/search featureNote about filter by time range:
Recipe#time_string=(st)andRecipe#time_stringto set/get string format oftimefield2. Weight converter:
GET /api/converters/convertI'm not sure I understand the requirement correctly, but this converter is implemented as fixed, regardless ingredient.
It requires 3 parameters:
e.g
/api/converters/convert?from_unit=cup&to_unit=gram&from_amount=5In my opinion, converter should be dependent on ingredient. (A cup of water and a cup of sugar will be corresponding to different number of grams
BTW, I also think an ingredient should have a name
3. Rating: APIs for this feature require authentication (Bear)