From 87052eaff2c6e3a8c97e57b2358ede725c33c1dc Mon Sep 17 00:00:00 2001 From: Pakorn Nathong Date: Thu, 2 Jan 2025 00:53:34 +0700 Subject: [PATCH] feat: add basic article type --- src/timeline-v1.ts | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/src/timeline-v1.ts b/src/timeline-v1.ts index d9b4661..8ea409f 100644 --- a/src/timeline-v1.ts +++ b/src/timeline-v1.ts @@ -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; @@ -97,6 +140,11 @@ export interface TimelineResultRaw { }; }; }; + article?: { + article_results?: { + result?: TimelineArticleResultRaw; + }; + }; quoted_status_result?: { result?: TimelineResultRaw; };