Migrate gitea-sdk to v0.12.0 (#133)
Migrate Update code.gitea.io/sdk/gitea to v0.12.0. Co-authored-by: 6543 <6543@obermui.de> Reviewed-on: https://gitea.com/gitea/tea/pulls/133 Reviewed-by: Andrew Thornton <art27@cantab.net> Reviewed-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
12
vendor/code.gitea.io/sdk/gitea/admin_org.go
generated
vendored
12
vendor/code.gitea.io/sdk/gitea/admin_org.go
generated
vendored
@@ -11,10 +11,16 @@ import (
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// AdminListOrgsOptions options for listing admin's organizations
|
||||
type AdminListOrgsOptions struct {
|
||||
ListOptions
|
||||
}
|
||||
|
||||
// AdminListOrgs lists all orgs
|
||||
func (c *Client) AdminListOrgs() ([]*Organization, error) {
|
||||
orgs := make([]*Organization, 0, 10)
|
||||
return orgs, c.getParsedResponse("GET", "/admin/orgs", nil, nil, &orgs)
|
||||
func (c *Client) AdminListOrgs(opt AdminListOrgsOptions) ([]*Organization, error) {
|
||||
opt.setDefaults()
|
||||
orgs := make([]*Organization, 0, opt.PageSize)
|
||||
return orgs, c.getParsedResponse("GET", fmt.Sprintf("/admin/orgs?%s", opt.getURLQuery().Encode()), nil, nil, &orgs)
|
||||
}
|
||||
|
||||
// AdminCreateOrg create an organization
|
||||
|
||||
Reference in New Issue
Block a user