We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d663a2e commit b4860afCopy full SHA for b4860af
organization.go
@@ -0,0 +1,31 @@
1
+package proton
2
+
3
+import (
4
+ "context"
5
6
+ "github.com/go-resty/resty/v2"
7
+)
8
9
+type OrganizationResponse struct {
10
+ Code int
11
+ Organization organization
12
+}
13
14
+type organization struct {
15
+ Name string
16
+ DisplayName string
17
+ PlanName string
18
+ MaxMembers int
19
20
21
+func (c *Client) GetOrganizationData(ctx context.Context) (OrganizationResponse, error) {
22
+ var res OrganizationResponse
23
24
+ if err := c.do(ctx, func(r *resty.Request) (*resty.Response, error) {
25
+ return r.SetResult(&res).Get("/core/v4/organizations")
26
+ }); err != nil {
27
+ return res, err
28
+ }
29
30
+ return res, nil
31
0 commit comments