diff options
Diffstat (limited to 'internal/models/x.go')
| -rw-r--r-- | internal/models/x.go | 29 |
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"` +} |
