feat: add category write operations (create, update, remove, get-by-name)
Add CreateCategory, UpdateCategory, RemoveCategory, and GetCategoryByName methods to the client, with BoardScope wrappers for project-scoped operations. Includes comprehensive tests for all new methods. Closes kanboard-4n3
This commit is contained in:
parent
56da2e0fdc
commit
4e856cd206
5 changed files with 350 additions and 2 deletions
|
|
@ -43,6 +43,16 @@ func (b *BoardScope) CreateTask(ctx context.Context, req CreateTaskRequest) (*Ta
|
|||
return b.client.CreateTask(ctx, req)
|
||||
}
|
||||
|
||||
// CreateCategory creates a new category in the project and returns its ID.
|
||||
func (b *BoardScope) CreateCategory(ctx context.Context, name string, colorID string) (int, error) {
|
||||
return b.client.CreateCategory(ctx, b.projectID, name, colorID)
|
||||
}
|
||||
|
||||
// GetCategoryByName returns a category by name within the project.
|
||||
func (b *BoardScope) GetCategoryByName(ctx context.Context, name string) (*Category, error) {
|
||||
return b.client.GetCategoryByName(ctx, b.projectID, name)
|
||||
}
|
||||
|
||||
// CreateTaskFromParams creates a new task in the project using TaskParams.
|
||||
// This provides a fluent interface for task creation.
|
||||
func (b *BoardScope) CreateTaskFromParams(ctx context.Context, params *TaskParams) (*Task, error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue