feat: add GetColorList for available task colors
Adds GetColorList() to query the available task colors from the Kanboard instance. Returns a map of color_id to display name (e.g., "yellow" -> "Yellow"). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
449cd2626c
commit
c15d52633f
4 changed files with 115 additions and 3 deletions
17
application.go
Normal file
17
application.go
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
package kanboard
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
)
|
||||
|
||||
// GetColorList returns the available task colors.
|
||||
// Returns a map of color_id to display name (e.g., "yellow" -> "Yellow").
|
||||
func (c *Client) GetColorList(ctx context.Context) (map[string]string, error) {
|
||||
var result map[string]string
|
||||
if err := c.call(ctx, "getColorList", nil, &result); err != nil {
|
||||
return nil, fmt.Errorf("getColorList: %w", err)
|
||||
}
|
||||
|
||||
return result, nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue