Skip to content

Implement GET listens endpoint#5

Merged
VoxSecundus merged 3 commits intomainfrom
feature/listens
Aug 23, 2025
Merged

Implement GET listens endpoint#5
VoxSecundus merged 3 commits intomainfrom
feature/listens

Conversation

@VoxSecundus
Copy link
Copy Markdown
Owner

No description provided.

@VoxSecundus VoxSecundus requested a review from Copilot August 1, 2025 20:04
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements a new GET listens endpoint that allows users to retrieve their listen history from ListenBrainz with optional filtering parameters.

Key changes:

  • Added listens method to UserClient with support for timestamp and count filtering
  • Refactored the API client to use a more generic get method instead of api_call
  • Added comprehensive test coverage for the new functionality

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/overhear/clients/client.rb Renamed api_call to get and added query parameter support
lib/overhear/clients/user_client.rb Implemented listens method and updated existing methods to use new get method
sig/overhear.rbs Updated type signatures to reflect API changes
test/test_user_client.rb Added comprehensive test coverage for the new listens method
Comments suppressed due to low confidence (1)

test/test_user_client.rb:24

  • The parameter _params should be named params since it's actually used in the method body (line 46). The underscore prefix indicates an unused parameter.
      def get(_endpoint, _headers, _params = {})

Comment thread lib/overhear/clients/client.rb
@VoxSecundus VoxSecundus merged commit 399f043 into main Aug 23, 2025
1 check passed
@VoxSecundus VoxSecundus deleted the feature/listens branch August 23, 2025 10:09
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.

2 participants