Implement shared MusicBrainz client crate #14
Notifications
Total Time Spent: 1 hour 8 minutes
connor
1 hour 8 minutes
No due date set.
Dependencies
No dependencies set.
Reference: Shanty/Main#14
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Both
shanty-tag(Issue #4) andshanty-search(Issue #8) need to communicate with the MusicBrainz API. Rather than duplicating the client, rate-limiting logic, and type definitions, extract a shared MusicBrainz client.This could be a standalone crate (e.g.,
shanty-mb) or a module withinshanty-db. It should provide:HTTP client — configured with:
Shanty/<version> (<contact>)) as required by MusicBrainzAPI methods:
search_artists(query, limit)→ artist resultssearch_releases(query, artist_hint, limit)→ release resultssearch_recordings(query, artist_hint, limit)→ recording resultsget_artist(mbid)→ full artist detailsget_release(mbid)→ full release details with track listingget_recording(mbid)→ full recording detailsget_artist_releases(mbid)→ artist's discographyget_cover_art(release_mbid)→ cover art URL from Cover Art ArchiveResponse types — well-typed Rust structs for all API responses, with
serdedeserializationTesting — mock server tests (using
mockitoorwiremock) to test client behavior without hitting the real APIAcceptance Criteria
shanty-tagandshanty-searchDependencies