Feat: Personalised routes#17
Draft
Exerra wants to merge 18 commits into
Draft
Conversation
Added mediaUserToken to MusicKit constructor and updated fetchAPI to accept custom request options, enabling support for personalized Apple Music API routes.
Implemented MeResource for user-specific data, updated FetchAPI to support fetch options, and automatically sync mediaUserToken with request headers.
Implemented getHeavyRotation resource method and added necessary types for HeavyRotation items. Refactored MeHistory properties to use a generic base type.
Implemented the getStorefront endpoint for the /me resource, including support for raw data responses and automatic flattening of storefront objects.
Updates MusicKitResultWrapper to a discriminated union, improves dynamic Music-User-Token header handling via a getter, and standardizes error handling across resource methods.
…etchers Updated resource accessor methods to support passing BunFetchRequestInit options to the fetchAPI method. Additionally added null-coalescing and safety checks to the fetchAPI response parsing.
Implemented addToFavorites method in the MeResource class to allow adding songs, albums, artists, and other media types to the user's favorites via the Apple Music API.
Increment version in package.json to prepare for next release cycle.
Prefixed shared type names (Attributes, Artwork, etc.) with their respective entity names to prevent naming collisions and improve clarity. Added missing type exports to the index entry point for better package usability.
Incremented package version in package.json to 3.1.0-next.1.
Updated type exports in src/index.ts to use .js extensions, ensuring compatibility with 'NodeNext' module resolution. Added missing exports for heavyrotation, libraryplaylist, play, and relationships.
Increment package version in package.json to 3.1.0-next.2.
Moved MeHistoryGenericProps and MeHistoryRecentlyPlayedTracksProps definitions from src/resources/me/history.ts to the new src/types/me.ts file to improve maintainability and import consistency.
Added export for types/me.js in src/index.ts to expose user-related types from the Apple Music API.
Increment package version in package.json for the next release candidate.
Incremented package version in package.json to prepare for the next release.
Relax typescript peerDependency from exact major version to >=5 to improve compatibility with newer releases.
Update package version in package.json for the next release candidate.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Addresses #9
For the time being I will maintain a TODO list here.
That is roughly the scope for now. More will follow later, but these (I feel like) are the main ones.