From 5bb9e482528f43ffc49f91435740e5bde9394b50 Mon Sep 17 00:00:00 2001 From: George Zhang Date: Tue, 6 Jan 2026 17:41:30 +0800 Subject: [PATCH] refactor: move home query ID methods to mixin as private MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Follow the pattern from twitter-client-timelines.ts where query ID methods are private to the mixin that uses them, rather than protected in the base class. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- src/lib/twitter-client-base.ts | 10 ---------- src/lib/twitter-client-home.ts | 10 ++++++++++ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/lib/twitter-client-base.ts b/src/lib/twitter-client-base.ts index 6b8f8b0..9b9f7c8 100644 --- a/src/lib/twitter-client-base.ts +++ b/src/lib/twitter-client-base.ts @@ -67,16 +67,6 @@ export abstract class TwitterClientBase { return Array.from(new Set([primary, 'M1jEez78PEfVfbQLvlWMvQ', '5h0kNbk3ii97rmfY6CdgAA', 'Tp1sewRU1AsZpBWhqCZicQ'])); } - protected async getHomeTimelineQueryIds(): Promise { - const primary = await this.getQueryId('HomeTimeline'); - return Array.from(new Set([primary, 'edseUwk9sP5Phz__9TIRnA'])); - } - - protected async getHomeLatestTimelineQueryIds(): Promise { - const primary = await this.getQueryId('HomeLatestTimeline'); - return Array.from(new Set([primary, 'iOEZpOdfekFsxSlPQCQtPg'])); - } - protected async fetchWithTimeout(url: string, init: RequestInit): Promise { if (!this.timeoutMs || this.timeoutMs <= 0) { return fetch(url, init); diff --git a/src/lib/twitter-client-home.ts b/src/lib/twitter-client-home.ts index 03d8326..4f7794d 100644 --- a/src/lib/twitter-client-home.ts +++ b/src/lib/twitter-client-home.ts @@ -24,6 +24,16 @@ export function withHome>( super(...args); } + private async getHomeTimelineQueryIds(): Promise { + const primary = await this.getQueryId('HomeTimeline'); + return Array.from(new Set([primary, 'edseUwk9sP5Phz__9TIRnA'])); + } + + private async getHomeLatestTimelineQueryIds(): Promise { + const primary = await this.getQueryId('HomeLatestTimeline'); + return Array.from(new Set([primary, 'iOEZpOdfekFsxSlPQCQtPg'])); + } + /** * Get the authenticated user's "For You" home timeline */