refactor: move home query ID methods to mixin as private
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 <[email protected]>
This commit is contained in:
committed by
Peter Steinberger
co-authored by
Claude Opus 4.5
parent
73b8cff1b2
commit
5bb9e48252
@@ -67,16 +67,6 @@ export abstract class TwitterClientBase {
|
||||
return Array.from(new Set([primary, 'M1jEez78PEfVfbQLvlWMvQ', '5h0kNbk3ii97rmfY6CdgAA', 'Tp1sewRU1AsZpBWhqCZicQ']));
|
||||
}
|
||||
|
||||
protected async getHomeTimelineQueryIds(): Promise<string[]> {
|
||||
const primary = await this.getQueryId('HomeTimeline');
|
||||
return Array.from(new Set([primary, 'edseUwk9sP5Phz__9TIRnA']));
|
||||
}
|
||||
|
||||
protected async getHomeLatestTimelineQueryIds(): Promise<string[]> {
|
||||
const primary = await this.getQueryId('HomeLatestTimeline');
|
||||
return Array.from(new Set([primary, 'iOEZpOdfekFsxSlPQCQtPg']));
|
||||
}
|
||||
|
||||
protected async fetchWithTimeout(url: string, init: RequestInit): Promise<Response> {
|
||||
if (!this.timeoutMs || this.timeoutMs <= 0) {
|
||||
return fetch(url, init);
|
||||
|
||||
@@ -24,6 +24,16 @@ export function withHome<TBase extends AbstractConstructor<TwitterClientBase>>(
|
||||
super(...args);
|
||||
}
|
||||
|
||||
private async getHomeTimelineQueryIds(): Promise<string[]> {
|
||||
const primary = await this.getQueryId('HomeTimeline');
|
||||
return Array.from(new Set([primary, 'edseUwk9sP5Phz__9TIRnA']));
|
||||
}
|
||||
|
||||
private async getHomeLatestTimelineQueryIds(): Promise<string[]> {
|
||||
const primary = await this.getQueryId('HomeLatestTimeline');
|
||||
return Array.from(new Set([primary, 'iOEZpOdfekFsxSlPQCQtPg']));
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the authenticated user's "For You" home timeline
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user