Fix API endpoints: resource IDs in URL path, not query params
- artists/{artist_id}/tracks and /direct-albums: artistID in path, return ArtistTracks/ArtistAlbums with pager
- likes: /users/me/likes/{type}s/{add-multiple|remove}, IDs as body params
- queue: /queues/{queue_id}/... instead of /queue/...?queue_id=...
- radio: /rotor/station/{station_id}/info and /tracks
- concerts: /concerts/{concert_id}/info, /concerts/tab-config
- playlists: /users/{user_id}/playlists
- labels: /labels/{label_id}, /albums, /artists
- clips: /clips/will/like, /artists/{artist_id}/blocks/artist-clips
- feed: /landing3/* endpoints
Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
1 parent
02a6dabcfb
commit
70c2a5cd01
12 files changed
+238
-168
No files matched your search
@@ -36,20 +36,17 @@ func (c *Client) GetClips(ctx context.Context, page, pageSize int) ([]*models.Cl
|
||||
// GetClipsWillLike gets clips the user might like
|
||||
func (c *Client) GetClipsWillLike(ctx context.Context) (*models.ClipsWillLike, error) {
|
||||
var result models.ClipsWillLike
|
||||
if err := c.request.Get(ctx, "/clips/will-like", nil, &result); err != nil {
|
||||
if err := c.request.Get(ctx, "/clips/will/like", nil, &result); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &result, nil
|
||||
}
|
||||
|
||||
// GetArtistClips gets clips by an artist
|
||||
// GET /artists/{artistID}/blocks/artist-clips
|
||||
func (c *Client) GetArtistClips(ctx context.Context, artistID string) (*models.ArtistClipData, error) {
|
||||
params := map[string]string{
|
||||
"artist_id": artistID,
|
||||
}
|
||||
|
||||
var result models.ArtistClipData
|
||||
if err := c.request.Get(ctx, "/artists/clips", params, &result); err != nil {
|
||||
if err := c.request.Get(ctx, fmt.Sprintf("/artists/%s/blocks/artist-clips", artistID), nil, &result); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &result, nil
|
||||
|
||||
Reference in new issue
Block a user