diff options
| author | s <[email protected]> | 2025-11-10 08:31:32 -0500 |
|---|---|---|
| committer | s <[email protected]> | 2025-11-10 08:31:32 -0500 |
| commit | 7c0f4b692c3b712bf4a0da3bbac008ff75c405de (patch) | |
| tree | 9ba8faa5c23541f4b000f6996b2589931925b5fd /internal/models | |
| parent | 65acee9a9b500c17b9426f80997401758ec326b1 (diff) | |
| download | dborg-7c0f4b692c3b712bf4a0da3bbac008ff75c405de.tar.gz dborg-7c0f4b692c3b712bf4a0da3bbac008ff75c405de.zip | |
feat: add x replies/search commands and improve api key validationv0.7.0
Diffstat (limited to 'internal/models')
| -rw-r--r-- | internal/models/reddit.go | 29 | ||||
| -rw-r--r-- | internal/models/x.go | 29 |
2 files changed, 48 insertions, 10 deletions
diff --git a/internal/models/reddit.go b/internal/models/reddit.go index 4d81aa8..bfe4172 100644 --- a/internal/models/reddit.go +++ b/internal/models/reddit.go @@ -8,14 +8,23 @@ type RedditUserParams struct { Username string `json:"username"` } -type RedditResponse struct { - Subreddit string `json:"subreddit,omitempty"` - Username string `json:"username,omitempty"` - Type string `json:"type,omitempty"` - Results interface{} `json:"results"` - Credits struct { - Remaining int `json:"remaining"` - Unlimited bool `json:"unlimited"` - } `json:"credits"` - Error string `json:"error,omitempty"` +type RedditCredits struct { + Remaining int `json:"remaining"` + Unlimited bool `json:"unlimited"` +} + +type SubredditResponse struct { + Subreddit string `json:"subreddit"` + Type string `json:"type"` + Results interface{} `json:"results"` + Credits RedditCredits `json:"credits"` + Error string `json:"error,omitempty"` +} + +type UserResponse struct { + Username string `json:"username"` + Type string `json:"type"` + Results interface{} `json:"results"` + Credits RedditCredits `json:"credits"` + Error string `json:"error,omitempty"` } diff --git a/internal/models/x.go b/internal/models/x.go index 07c3117..8480d32 100644 --- a/internal/models/x.go +++ b/internal/models/x.go @@ -79,3 +79,32 @@ type NotableFollowersResponse struct { Unlimited bool `json:"unlimited"` } `json:"credits"` } + +type ScrapedReply struct { + ConversationID string `json:"conversation_id"` + Date string `json:"date"` + ID string `json:"id"` + InReplyToID string `json:"in_reply_to_id"` + Languages string `json:"languages"` + Likes string `json:"likes"` + Name string `json:"name"` + Post string `json:"post"` + Quotes string `json:"quotes"` + Reposts string `json:"reposts"` + Type string `json:"type"` + URL string `json:"url"` + Username string `json:"username"` +} + +type ScrapedTweet struct { + Date string `json:"date"` + ID string `json:"id"` + Languages string `json:"languages"` + Likes string `json:"likes"` + Name string `json:"name"` + Post string `json:"post"` + Quotes string `json:"quotes"` + Reposts string `json:"reposts"` + Type string `json:"type"` + URL string `json:"url"` +} |
