aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/gogs/go-gogs-client/org.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/gogs/go-gogs-client/org.go')
-rw-r--r--vendor/github.com/gogs/go-gogs-client/org.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/vendor/github.com/gogs/go-gogs-client/org.go b/vendor/github.com/gogs/go-gogs-client/org.go
index 08d00882..10d22b50 100644
--- a/vendor/github.com/gogs/go-gogs-client/org.go
+++ b/vendor/github.com/gogs/go-gogs-client/org.go
@@ -50,6 +50,15 @@ type EditOrgOption struct {
Location string `json:"location"`
}
+func (c *Client) CreateOrg(opt CreateOrgOption) (*Organization, error) {
+ body, err := json.Marshal(&opt)
+ if err != nil {
+ return nil, err
+ }
+ org := new(Organization)
+ return org, c.getParsedResponse("POST", "/user/orgs", jsonHeader, bytes.NewReader(body), org)
+}
+
func (c *Client) EditOrg(orgname string, opt EditOrgOption) error {
body, err := json.Marshal(&opt)
if err != nil {