Skip to content

Commit

Permalink
feat: add basic article type
Browse files Browse the repository at this point in the history
  • Loading branch information
y-pakorn committed Jan 1, 2025
1 parent 8c07898 commit 87052ea
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions src/timeline-v1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,49 @@ export interface SearchResultRaw {
legacy?: LegacyTweetRaw;
}

export interface TimelineArticleResultRaw {
id?: string;
title?: string;
preview_text?: string;
cover_media?: {
media_id?: string;
media_info?: {
original_img_url?: string;
original_img_height?: number;
original_img_width?: number;
};
};
content_state?: {
blocks?: {
key?: string;
data?: string;
text?: string;
entityRanges?: {
key?: number;
length?: number;
offset?: number;
}[];
}[];
};
entityMap?: {
key?: string;
value?: {
type?: string; // LINK, MEDIA, TWEET
mutability?: string;
data?: {
entityKey?: string;
url?: string;
tweetId?: string;
mediaItems?: {
localMediaId?: string;
mediaCategory?: string;
mediaId?: string;
}[];
};
};
}[];
}

export interface TimelineResultRaw {
rest_id?: string;
__typename?: string;
Expand All @@ -97,6 +140,11 @@ export interface TimelineResultRaw {
};
};
};
article?: {
article_results?: {
result?: TimelineArticleResultRaw;
};
};
quoted_status_result?: {
result?: TimelineResultRaw;
};
Expand Down

0 comments on commit 87052ea

Please sign in to comment.