diff --git a/gitea/miscellaneous.go b/gitea/miscellaneous.go index 30aaee7..bdb7ede 100644 --- a/gitea/miscellaneous.go +++ b/gitea/miscellaneous.go @@ -11,3 +11,12 @@ type MarkdownOption struct { Context string Wiki bool } + +type ServerVersion struct { + Version string +} + +func (c *Client) ServerVersion() (string, error) { + v := ServerVersion{} + return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v) +}