summaryrefslogtreecommitdiffstats
path: root/internal/client/admin.go
diff options
context:
space:
mode:
authors <[email protected]>2025-11-16 02:40:58 -0500
committers <[email protected]>2025-11-16 02:40:58 -0500
commit76d0cff639988ca506b1dc6e848841944c96b263 (patch)
treeb841dce1980bdb50d9f0c8f96d649a53a1778029 /internal/client/admin.go
parentf4c58dfee401431c37e853643d0188cd020f66d7 (diff)
downloaddborg-1.0.3.tar.gz
dborg-1.0.3.zip
docs: add comprehensive api endpoints documentation and expand cli functionalityv1.0.3
Diffstat (limited to 'internal/client/admin.go')
-rw-r--r--internal/client/admin.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/internal/client/admin.go b/internal/client/admin.go
index f4838b7..bf8c5ce 100644
--- a/internal/client/admin.go
+++ b/internal/client/admin.go
@@ -122,3 +122,17 @@ func (c *Client) ToggleAccount(apiKey string, enable bool) (*models.AdminRespons
return &response, nil
}
+
+func (c *Client) GetAccountStats() (*models.AccountStatsResponse, error) {
+ data, err := c.Get("/me", nil)
+ if err != nil {
+ return nil, err
+ }
+
+ var response models.AccountStatsResponse
+ if err := json.Unmarshal(data, &response); err != nil {
+ return nil, fmt.Errorf("failed to parse account stats response: %w", err)
+ }
+
+ return &response, nil
+}