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

Add new API 'ServerVersion' #43

Merged
merged 2 commits into from
Mar 4, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions gitea/miscellaneous.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,14 @@ type MarkdownOption struct {
Context string
Wiki bool
}

// ServerVersion wraps the version of the server
type ServerVersion struct {
Version string
}

// ServerVersion returns the version of the server
func (c *Client) ServerVersion() (string, error) {
v := ServerVersion{}
return v.Version, c.getParsedResponse("GET", "/api/v1/version", nil, nil, &v)
}