-
Notifications
You must be signed in to change notification settings - Fork 1
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
Search for a range of dates #51
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, generic comment to show comprehension goes here.
(I did fully review this line by line)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, I am sure the empty field in the line below serves a purpose. But could you briefly explain the empty field at the start of class because I am not sure what that purpose is.
api_response = apiCalls.searchNotes('created_date', "", desired_response, start, end)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch, didn't consider this
this resolves Chris' desire for a default end as today and default start as sometime in the distant past
Closes Issue #40
This refactor required changes to four files:
API.md
: the "Additional Feature 1: Search notes by note content" section now includes mention of an optional "start" and "end" field for the body sent to the/notes/search
endpointapp.py
: search endpoint now supportsstart
andend
payload key values, which contain (you guessed it) the start and end dates for the search windows for both modified and created dates searches. Notice that we only check for the values of these keys if the search_field is one of the dates fields, otherwise we don't read it at allapiCalls.py
: json for the calls to the search endpoint need to be variable now. if we see that the key is modified or created date, we need to include the start and end values. we do that by setting start and end equal to None type by default, so that they don't need to be included by the caller on the frontend, but can be.frontend.py
: now we need to ask the user for two values whenever they run the modified and created date case: the start and end date by which to search.