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 my.harvard term querying #12

Merged
merged 5 commits into from
Jun 29, 2023
Merged

Fix my.harvard term querying #12

merged 5 commits into from
Jun 29, 2023

Conversation

ColeFrench
Copy link
Collaborator

Fixes #8 and addresses #9.

Nothing crazy, except we are adding a new dependency on a very small library. The library provides a limited writer that lets us store the first n=1024 bytes of a response as plaintext while continuing to read the whole thing into a JSON decoder. If the decoding fails, then we print our little plaintext so the user can see what went wrong. We only store the first n bytes in case the response is very large.

@ColeFrench ColeFrench requested a review from ekzhang June 29, 2023 22:23
Copy link
Owner

@ekzhang ekzhang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! Minor comment but it doesn't really matter

datasource/myharvard.go Outdated Show resolved Hide resolved
@ColeFrench ColeFrench merged commit e2c31d3 into main Jun 29, 2023
@ColeFrench ColeFrench deleted the data-gathering branch June 29, 2023 23:28
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.

Queries restricted to specific terms return more courses from my.harvard than expected
2 participants