summaryrefslogtreecommitdiffstats
path: root/internal/models
diff options
context:
space:
mode:
authors <[email protected]>2025-11-06 22:15:13 -0500
committers <[email protected]>2025-11-06 22:15:13 -0500
commiteab6a1b6899413154f855abbd200ac775b22be75 (patch)
treed2671b1609ff38f3f5c60944017ac063088aa162 /internal/models
parent27add8c96a7df242618e1ebcb8c7271661e21688 (diff)
downloaddborg-eab6a1b6899413154f855abbd200ac775b22be75.tar.gz
dborg-eab6a1b6899413154f855abbd200ac775b22be75.zip
refactor: split x command into history and tweets subcommands with streaming support
Diffstat (limited to 'internal/models')
-rw-r--r--internal/models/x.go29
1 files changed, 29 insertions, 0 deletions
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"`
+}