diff options
| author | s <[email protected]> | 2025-11-09 14:26:42 -0500 |
|---|---|---|
| committer | s <[email protected]> | 2025-11-09 14:26:42 -0500 |
| commit | 65acee9a9b500c17b9426f80997401758ec326b1 (patch) | |
| tree | 358adc19e4099077d09f7d0001a3269a07a63da4 /internal | |
| parent | f1070f0a2be928d188c418b59fcbc8e82d1a9367 (diff) | |
| download | dborg-65acee9a9b500c17b9426f80997401758ec326b1.tar.gz dborg-65acee9a9b500c17b9426f80997401758ec326b1.zip | |
feat: add osint geo search command for address information lookupv0.6.0
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/client/osint.go | 22 | ||||
| -rw-r--r-- | internal/models/osint.go | 9 |
2 files changed, 31 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 +} diff --git a/internal/models/osint.go b/internal/models/osint.go index 950225d..d025836 100644 --- a/internal/models/osint.go +++ b/internal/models/osint.go @@ -90,3 +90,12 @@ type ShortlinksSearchResponse struct { Credits CreditsInfo `json:"credits"` Results interface{} `json:"results"` } + +type GeoSearchParams struct { + Street string + City string + State string + Zip string +} + +type GeoSearchResponse map[string]interface{} |
