закуп много каналов
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user