Skip to content

Move user listening logic to new client#7

Merged
VoxSecundus merged 7 commits intomainfrom
refactor/split-user-listens
Aug 24, 2025
Merged

Move user listening logic to new client#7
VoxSecundus merged 7 commits intomainfrom
refactor/split-user-listens

Conversation

@VoxSecundus
Copy link
Copy Markdown
Owner

No description provided.

@VoxSecundus VoxSecundus requested a review from Copilot August 24, 2025 15:55
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 refactors the user listening logic by extracting it from the UserClient into a new ListenClient class, creating better separation of concerns. The refactoring introduces a shared AuthenticatableClient base class to handle common authentication functionality.

  • Extracted listen-related methods from UserClient to a new ListenClient class
  • Created AuthenticatableClient base class for shared authentication logic
  • Updated tests to reflect the new client structure and improved Response class handling

Reviewed Changes

Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lib/overhear/clients/authenticatable_client.rb New base class handling authentication logic shared between client classes
lib/overhear/clients/user_client.rb Refactored to inherit from AuthenticatableClient, now only handles now_playing functionality
lib/overhear/clients/listen_client.rb New client class containing listen-related methods (listen_count, listens)
test/test_listen_client.rb New test file for ListenClient functionality
test/test_user_client.rb Updated tests to focus on UserClient's remaining functionality
test/test_helper.rb Added Response class for consistent test mocking
sig/overhear.rbs Updated type signatures to reflect new class hierarchy
lib/overhear.rb Added require statements for new client classes
lib/overhear/clients/client.rb Fixed URL joining using URI.join

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment thread lib/overhear/clients/authenticatable_client.rb Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@VoxSecundus VoxSecundus merged commit eb22099 into main Aug 24, 2025
1 check passed
@VoxSecundus VoxSecundus deleted the refactor/split-user-listens branch August 24, 2025 15:58
@VoxSecundus VoxSecundus review requested due to automatic review settings March 23, 2026 19:22
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