From eab6a1b6899413154f855abbd200ac775b22be75 Mon Sep 17 00:00:00 2001 From: s Date: Thu, 6 Nov 2025 22:15:13 -0500 Subject: refactor: split x command into history and tweets subcommands with streaming support --- internal/models/x.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) (limited to 'internal/models/x.go') diff --git a/internal/models/x.go b/internal/models/x.go index f8c7a70..b4e6eac 100644 --- a/internal/models/x.go +++ b/internal/models/x.go @@ -20,3 +20,32 @@ type UserHistory struct { Username string `json:"username"` TimeAgo string `json:"time_ago"` } + +type TweetResult struct { + Handle string `json:"handle"` + Name string `json:"name"` + Text string `json:"text"` + TweetID string `json:"tweet_id"` + Type string `json:"type"` + URL string `json:"url"` +} + +type Progress struct { + Current int `json:"current"` + Total int `json:"total"` +} + +type Complete struct { + Duration string `json:"duration"` + FailedIDs []string `json:"failed_ids"` + TotalFailed int `json:"total_failed"` + TotalFetched int `json:"total_fetched"` +} + +type TweetsStreamResponse struct { + Username string `json:"username,omitempty"` + Tweet *TweetResult `json:"tweet,omitempty"` + Progress *Progress `json:"progress,omitempty"` + Complete *Complete `json:"complete,omitempty"` + Error string `json:"error,omitempty"` +} -- cgit v1.2.3