feat / define mark as watched user action #25
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request, a grand tapestry woven with threads of schema, request, and UI enhancements, significantly enriches both the API and client projects. Prepare to witness a symphony of data handling and user interaction, harmonizing across the digital realm.
API Enhancements:
Schema Definitions:
idsRequestSchema.ts
scroll unfurls, revealing a meticulous catalog of schemas for various media IDs, includingshowIdsRequestSchema
,movieIdsRequestSchema
,seasonIdsRequestSchema
, andepisodeIdsRequestSchema
. These inscriptions provide a structured framework for identifying the myriad media entities within the Trakt universe.mediaIdsRequestSchema
, a relic of a bygone era, fades into obsolescence, replaced by the newly forged schemas inmovieCheckinRequestSchema.ts
andshowCheckinRequestSchema.ts
.Request and Response Handling:
historyRequestSchema
andhistoryResponseSchema
emerge, a pair of scrolls governing the flow of history-related requests and responses. These inscriptions ensure the proper handling of temporal data, allowing users to traverse the annals of their viewing past.sync
router, a nexus of data synchronization, expands its repertoire to incorporate the newly charted history endpoint, further enriching its capabilities.Testing:
HistoryRequest
, ensuring that it adheres to the sacred laws of type handling and validation. These trials guarantee the robustness and reliability of this critical component.Client Enhancements:
UI Components:
EpisodeFooter.svelte
component, a humble repository of episode details, receives an upgrade, now adorned with an optionalactions
prop, allowing for the integration of additional UI elements and enhanced user interaction.MarkAsWatchedButton.svelte
component, a conduit to user agency, materializes, empowering viewers to mark episodes as watched with a mere click. Its hover and active states provide visual feedback, guiding the user's hand through the digital realm.Integration:
UpNextEpisode.svelte
component, a harbinger of anticipation, embraces theMarkAsWatchedButton
, seamlessly integrating its functionality and responding to theonMarkAsWatched
event with grace.markAsWatched.ts
script, a messenger to the API, emerges, carrying the user's intent to mark an episode as watched and ensuring its inscription in the annals of viewing history.Data Handling:
upNext.ts
script, a purveyor of future viewing delights, undergoes a refinement, incorporating the episode ID into theUpNextEntry
type and its associated functions. This enhancement ensures the accurate identification and presentation of upcoming episodes.This grand tapestry of changes, woven with meticulous care and attention to detail, elevates the Trakt Lite experience to new heights. The API, fortified with robust schemas and request handling, provides a solid foundation for data integrity. The client, adorned with enhanced UI components and seamless integration, empowers users to navigate the world of media with ease and delight.