Skip to content

feat(api): add recent-tracks endpoint - #219

Merged
luke-h1 merged 1 commit into
mainfrom
feat/recent-tracks-endpoint
Jul 22, 2026
Merged

feat(api): add recent-tracks endpoint#219
luke-h1 merged 1 commit into
mainfrom
feat/recent-tracks-endpoint

Conversation

@luke-h1

@luke-h1 luke-h1 commented Jul 22, 2026

Copy link
Copy Markdown
Owner

Adds GET /api/recent-tracks to power the new /tracks page on lhowsam.com.

What

  • Returns recently scrobbled Last.fm tracks, each with a nowPlaying flag and a playedAt unix timestamp (null for the currently playing track)
  • Optional limit query param (1-50, default 10), CDN-cached with short revalidation
  • Parameterises LastFmApi.GetRecentTracks with a limit (now-playing still fetches 1)
  • New RecentTrackResponseItem / RecentTracksApiResponse models + source-gen registration
  • Documented in CONTEXT.md

Tests

Added an endpoint test covering mapping, the nowPlaying flag, and timestamp parsing. All 38 tests pass.

Adds GET /api/recent-tracks returning recently scrobbled Last.fm tracks
with a nowPlaying flag and playedAt timestamp per item. Accepts an
optional limit (1-50, default 10) and is CDN-cached with short
revalidation. Parameterises LastFmApi.GetRecentTracks with a limit.
@coderabbitai

coderabbitai Bot commented Jul 22, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@luke-h1, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 57 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: b7273022-b38f-45a1-a3f5-74f944b158f2

📥 Commits

Reviewing files that changed from the base of the PR and between d0260b2 and 1093e27.

📒 Files selected for processing (6)
  • CONTEXT.md
  • src/Lho.Lambda.Tests/ApiFunctionTests.cs
  • src/Lho.Lambda/Clients/LastFm/LastFmApi.cs
  • src/Lho.Lambda/Functions/ApiFunction.cs
  • src/Lho.Lambda/Models/LastFm.cs
  • src/Lho.Lambda/Serialization/ApiResponseJsonContext.cs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/recent-tracks-endpoint

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown

🚀 Staging Deployment

@luke-h1
luke-h1 merged commit 4037bc6 into main Jul 22, 2026
2 checks passed
@luke-h1
luke-h1 deleted the feat/recent-tracks-endpoint branch July 22, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant