summaryrefslogtreecommitdiffstats
path: root/internal/client/osint.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/client/osint.go')
-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
+}