Implement verified Lightdash API clients by researching documentation and verifying schemas against a live instance.
This skill implements a new Lightdash API operation in the internal/lightdash/api directory, along with necessary models in internal/lightdash/models. It relies on the research-lightdash-api skill for researching and verifying the API schema before implementation.
The user should provide:
/api/v1/projects/:projectUuid/spaces)GetSpaceV1, CreateDashboardV1)LIGHTDASH_API_KEY is available).internal/lightdash/models for existing structs that match the resource.internal/lightdash/models/<resource>.go.
json tags.internal/lightdash/api/<verb>_<resource>_v1.go (snake_case).Client struct: func (c *Client) <FunctionName>(...) (*<ReturnType>, error).http.NewRequest.fmt.Sprintf and c.HostUrl.c.doRequest(req).Results field if the API wraps the response in a Results envelope.internal/lightdash/api/<verb>_<resource>_v1_test.go to test unmarshaling logic with sample JSON.Ref: internal/lightdash/api/get_space_v1.go
package api
import (
"encoding/json"
"fmt"
"net/http"
"strings"
"github.com/ubie-oss/terraform-provider-lightdash/internal/lightdash/models"
)
type GetResourceV1Response struct {
Results models.Resource `json:"results"`
Status string `json:"status"`
}
func (c *Client) GetResourceV1(id string) (*models.Resource, error) {
if len(strings.TrimSpace(id)) == 0 {
return nil, fmt.Errorf("id is empty")
}
path := fmt.Sprintf("%s/api/v1/resource/%s", c.HostUrl, id)
req, err := http.NewRequest("GET", path, nil)
if err != nil {
return nil, fmt.Errorf("error creating request: %w", err)
}
body, err := c.doRequest(req)
if err != nil {
return nil, fmt.Errorf("error performing request: %w", err)
}
var response GetResourceV1Response
if err := json.Unmarshal(body, &response); err != nil {
return nil, fmt.Errorf("error unmarshaling response: %w", err)
}
return &response.Results, nil
}
npx skills add ubie-oss/implement-verified-lightdash-api-client下载完整 Skill 目录,包含 SKILL.md 及所有相关文件
Search for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer