aboutsummaryrefslogtreecommitdiffstats
path: root/modules/structs
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2021-06-17 09:17:35 +0200
committerGitHub <noreply@github.com>2021-06-17 09:17:35 +0200
commitc9d053f0caa14e6fec4d04c009c79c9a0940c450 (patch)
treecab2d45513f434cc931c35f73e81f2bc4e811f74 /modules/structs
parent9469e14dc6eb6f2dbd312527ed83d690800a8fc2 (diff)
downloadgitea-c9d053f0caa14e6fec4d04c009c79c9a0940c450.tar.gz
gitea-c9d053f0caa14e6fec4d04c009c79c9a0940c450.zip
[API] User expose counters (#16167)
Diffstat (limited to 'modules/structs')
-rw-r--r--modules/structs/user.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/structs/user.go b/modules/structs/user.go
index 2dbc530538..de2e68c2a2 100644
--- a/modules/structs/user.go
+++ b/modules/structs/user.go
@@ -43,6 +43,11 @@ type User struct {
Website string `json:"website"`
// the user's description
Description string `json:"description"`
+
+ // user counts
+ Followers int `json:"followers_count"`
+ Following int `json:"following_count"`
+ StarredRepos int `json:"starred_repos_count"`
}
// MarshalJSON implements the json.Marshaler interface for User, adding field(s) for backward compatibility