From 8472267b60b204cea5fbdeaf8fe06443822d1bfb Mon Sep 17 00:00:00 2001 From: s Date: Tue, 25 Nov 2025 09:38:31 -0500 Subject: feat: add crypto analysis, email verification, and telegram lookup commands --- internal/client/telegram.go | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 internal/client/telegram.go (limited to 'internal/client/telegram.go') diff --git a/internal/client/telegram.go b/internal/client/telegram.go new file mode 100644 index 0000000..33b4ac2 --- /dev/null +++ b/internal/client/telegram.go @@ -0,0 +1,28 @@ +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 +} -- cgit v1.2.3