package client import ( "encoding/json" "fmt" "git.db.org.ai/dborg/internal/models" "strings" ) func (c *Client) GetTelegramPhone(identifier string) (*models.TelegramPhoneResponse, error) { identifier = strings.TrimSpace(identifier) if identifier == "" { return nil, fmt.Errorf("identifier cannot be empty") } path := fmt.Sprintf("/telegram/phone/%s", identifier) data, err := c.Get(path, nil) if err != nil { return nil, err } var response models.TelegramPhoneResponse if err := json.Unmarshal(data, &response); err != nil { return nil, fmt.Errorf("failed to parse telegram response: %w", err) } return &response, nil }