-
Notifications
You must be signed in to change notification settings - Fork 0
get-course-info endpoint #22
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
base: main
Are you sure you want to change the base?
Conversation
…tion, when given a term and a course-id
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.
| "course_id": "the course_id", | ||
| "semester = "semester_in_words" |
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.
The formatting of one of these two lines is off. I know this is just documentation so it doesn't affect the functionality, but best to clean it before merging in.
| Example from COS 126, Fall 2021: | ||
| query = { "course_id": "002051", "semester": "Fall 2021" } | ||
| """ |
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.
Could you also specify what the format of the returned value is? I can find it by running it, but it's good to document the format.
Am I understanding correctly that the result is a list where the first element (position 0) is the information on the course, and the other elements of the list are evaluations? If so, is there possibly a neater way to format it? Perhaps as a dictionary with one key for info and the other key for evals? What do you think?
| # Running the Program -- Backend. | ||
| To run the program, ensure that your .env files are set up. See back_end README.md for instructions. | ||
|
|
||
| Then, use ```flask run``` to run the program. It will run on localhost:5000 |
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.
Thanks for documenting this! We should probably expand this readme even further at some point with more specific instructions, as well as an overview of the project (in a future pull request, of course, not here!).

In this PR, the get-course-info endpoint was created for the backend.
This endpoint returns 2 things (all packaged into one return)
1: All the information associated with a course_id and the semester
2: All of the course reviews associated with the course_id (across many semesters)
Use command
flask runto start the server.I would suggest using Postman to make these queries, as that can make the testing process go straightforward.
This is a sample string if you'd rather test in your browser:
http://localhost:5000/api/get-course-info?course_id=002051&semester=Fall 2021