| 666 | } |
| 667 | |
| 668 | func (c *Client) WorkspaceQuota(ctx context.Context, organizationID string, userID string) (WorkspaceQuota, error) { |
| 669 | res, err := c.Request(ctx, http.MethodGet, fmt.Sprintf("/api/v2/organizations/%s/members/%s/workspace-quota", organizationID, userID), nil) |
| 670 | if err != nil { |
| 671 | return WorkspaceQuota{}, err |
| 672 | } |
| 673 | defer res.Body.Close() |
| 674 | if res.StatusCode != http.StatusOK { |
| 675 | return WorkspaceQuota{}, ReadBodyAsError(res) |
| 676 | } |
| 677 | var quota WorkspaceQuota |
| 678 | return quota, json.NewDecoder(res.Body).Decode("a) |
| 679 | } |
| 680 | |
| 681 | type ResolveAutostartResponse struct { |
| 682 | ParameterMismatch bool `json:"parameter_mismatch"` |