Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit ec03aeb

Browse files
committed
Add new API 'ServerVersion'
1 parent 5771842 commit ec03aeb

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

gitea/miscellaneous.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,12 @@ type MarkdownOption struct {
1111
Context string
1212
Uncyclo bool
1313
}
14+
15+
type ServerVersion struct {
16+
Version string
17+
}
18+
19+
func (c *Client) ServerVersion() (string, error) {
20+
v := ServerVersion{}
21+
return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v)
22+
}

0 commit comments

Comments
 (0)