summaryrefslogtreecommitdiffstats
path: root/internal/client
diff options
context:
space:
mode:
authors <[email protected]>2025-11-09 14:26:42 -0500
committers <[email protected]>2025-11-09 14:26:42 -0500
commit65acee9a9b500c17b9426f80997401758ec326b1 (patch)
tree358adc19e4099077d09f7d0001a3269a07a63da4 /internal/client
parentf1070f0a2be928d188c418b59fcbc8e82d1a9367 (diff)
downloaddborg-65acee9a9b500c17b9426f80997401758ec326b1.tar.gz
dborg-65acee9a9b500c17b9426f80997401758ec326b1.zip
feat: add osint geo search command for address information lookupv0.6.0
Diffstat (limited to 'internal/client')
-rw-r--r--internal/client/osint.go22
1 files changed, 22 insertions, 0 deletions
diff --git a/internal/client/osint.go b/internal/client/osint.go
index d7e795c..2ee10c6 100644
--- a/internal/client/osint.go
+++ b/internal/client/osint.go
@@ -184,3 +184,25 @@ func (c *Client) SearchShortlinks(params *models.ShortlinksSearchParams) (*model
return &response, nil
}
+
+func (c *Client) SearchGeo(params *models.GeoSearchParams) (*models.GeoSearchResponse, error) {
+ path := "/osint/geo"
+
+ queryParams := url.Values{}
+ queryParams.Add("street", params.Street)
+ queryParams.Add("city", params.City)
+ queryParams.Add("state", params.State)
+ queryParams.Add("zip", params.Zip)
+
+ data, err := c.Get(path, queryParams)
+ if err != nil {
+ return nil, err
+ }
+
+ var response models.GeoSearchResponse
+ if err := json.Unmarshal(data, &response); err != nil {
+ return nil, fmt.Errorf("failed to parse geo search response: %w", err)
+ }
+
+ return &response, nil
+}