закуп много каналов

This commit is contained in:
Artem Tsyrulnikov
2026-01-04 18:06:12 +03:00
parent 9637f6ec3a
commit 5251ec3015
7 changed files with 115 additions and 15 deletions

View File

@@ -206,6 +206,30 @@ func (c *Client) GetWorkspaces(
return resp.Items, err
}
func (c *Client) CreateWorkspace(
ctx context.Context,
jwt string,
name string,
) (*Workspace, error) {
req := struct {
Name string `json:"name"`
}{
Name: name,
}
var workspace Workspace
err := c.do(
ctx,
http.MethodPost,
"api/v1/workspaces",
req,
&workspace,
withBearer(jwt),
)
return &workspace, err
}
func (c *Client) GetProjects(
ctx context.Context,
jwt string,