summaryrefslogtreecommitdiffstats
path: root/internal/models/reddit.go
diff options
context:
space:
mode:
authors <[email protected]>2025-11-10 08:31:32 -0500
committers <[email protected]>2025-11-10 08:31:32 -0500
commit7c0f4b692c3b712bf4a0da3bbac008ff75c405de (patch)
tree9ba8faa5c23541f4b000f6996b2589931925b5fd /internal/models/reddit.go
parent65acee9a9b500c17b9426f80997401758ec326b1 (diff)
downloaddborg-7c0f4b692c3b712bf4a0da3bbac008ff75c405de.tar.gz
dborg-7c0f4b692c3b712bf4a0da3bbac008ff75c405de.zip
feat: add x replies/search commands and improve api key validationv0.7.0
Diffstat (limited to 'internal/models/reddit.go')
-rw-r--r--internal/models/reddit.go29
1 files changed, 19 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"`
}