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

Commit 8807a1d

Browse files
authored
Merge pull request #43 from typeless/server-version
Add new API 'ServerVersion'
2 parents 5771842 + 439ea6c commit 8807a1d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

gitea/miscellaneous.go

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

0 commit comments

Comments
 (0)