jefit
jefit copied to clipboard
Refurbished JefitAPI
Overview
This PR updates the jefit package to handle usernames as identifiers following the latest Jefit API changes.
Changes Made
- Refactored
fetchMostRecentto accept usernames. - Modified error handling in
fetchSingleDateto follow Node.js callback conventions. - Updated corresponding unit tests.
Justification
The change is necessary to align with the Jefit API's shift from numeric user IDs to usernames, ensuring continued functionality of the package.
Impact
The update should not affect existing implementations as it adds functionality and remains backward compatible.
Testing
- New tests added for username functionality.
- All previous tests run to ensure no breakage.
Documentation
- README.md updated to guide users on the new method of calling functions with usernames.
Screenshots/Code Snippets
// Example of updated function call
fetchMostRecent('jjderz', callback);