Skip to content

Feat: Personalised routes#17

Draft
Exerra wants to merge 18 commits into
mainfrom
feat/personalisation
Draft

Feat: Personalised routes#17
Exerra wants to merge 18 commits into
mainfrom
feat/personalisation

Conversation

@Exerra

@Exerra Exerra commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Addresses #9

For the time being I will maintain a TODO list here.

  • GET users storefront
  • History (priority)
    • GET recently played tracks
    • GET heavy rotation content (bug with raw = false, left comment)
    • GET recently played resources
    • GET recently played stations
  • Library
    • POST add resource to library
    • POST add resource to favourites
    • Albums
      • GET library album
      • GET library album relationships
      • GET all library albums
    • Songs
      • GET library song
      • GET library song relationships
      • GET all library songs

That is roughly the scope for now. More will follow later, but these (I feel like) are the main ones.

Exerra added 2 commits July 11, 2026 18:53
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.
@Exerra Exerra self-assigned this Jul 11, 2026
@Exerra Exerra added the enhancement New feature or request label Jul 11, 2026
@Exerra Exerra added this to the TS & Personalisation (v4.0.0) milestone Jul 11, 2026
@Exerra Exerra linked an issue Jul 11, 2026 that may be closed by this pull request
Exerra added 16 commits July 11, 2026 19:41
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Personalized Endpoints

1 participant