package client import ( "dborg/internal/models" "encoding/json" "fmt" "net/url" ) func (c *Client) SearchTwitterHistory(username string) (*models.XResponse, error) { path := fmt.Sprintf("/x/search/%s", url.PathEscape(username)) data, err := c.Get(path, nil) if err != nil { return nil, err } var response models.XResponse if err := json.Unmarshal(data, &response); err != nil { return nil, fmt.Errorf("failed to parse Twitter/X response: %w", err) } return &response, nil }