-
Notifications
You must be signed in to change notification settings - Fork 0
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
feat(entry)!: add useEntry
hook and entryApi
with tests
#35
Conversation
- Define the main API interface with methods in the `entryApi` layer. - Create useEntry hook for dynamic url building using `journalId`. - Move RequestBundle from `useAccess` to `apiRequest` and modify existing logic.
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.
Looks really good @ishaan000 🙌 You've really went to the next level with TypeDoc. I have a few additional doc tips to share and just some general doc findings. Otherwise, the code this great! Please have a look.
Co-authored-by: Ryan James Meneses <[email protected]>
Co-authored-by: Ryan James Meneses <[email protected]>
- move `cross-fetch` to `devDependencies`. - remove extra line on 137 in `access.Api.ts`. - add typedocs for interface api in `entryApi.ts`. - add eslint rule for disabled test suite for entry.
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.
Great work Ishaan!! That wraps up the initial implementation of the hooks 🥳
Summary
entryApi
layer to define and manage the main API interface.useEntry
hook to streamline dynamic URL building usingjournalId
.RequestBundle
fromuseAccess
toapiRequest
.Details
New API Methods:
entry
,entryAnalysis
, andentryConversation
requests within theentryApi
layer.Dynamic Hook:
useEntry
hook to simplify API interactions and support dynamic paths.Code Refactoring:
useAccess
toapiRequest
.Testing:
entryApi
anduseEntry
with mock data.entryApi
methods anduseEntry
within the full application flow.journalId
values, including edge cases for empty and special characters.