infrastructure capa

infrastructure-adapters-google-places

Google Places API (New) adapter — text search with a pre-call dry-run cost estimator, API-key auth

Google Places API (New) adapter — text search with a pre-call dry-run cost estimator, API-key auth

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/adapters-google-places
Edition2021
Targetsinfrastructure_adapters_google_places
Public items0 across 0 modules
Tests29

What it is for

Google Places (New) API client adapter.

A pure API-client adapter over Google's Places (New) searchText endpoint (https://places.googleapis.com/v1), plus a pre-call dry-run cost estimator — Places billing is per-call, so knowing the cost of a planned batch of searches before spending money is a real safety feature, not source-specific dead weight to drop on harvest.

Lifted from two plumber source files (Gate 4.5 provenance, see CHANGELOG.md):

Places (New), impl Collector for GooglePlacesCollector. This is the crate's client (GooglePlacesClient::search_text) and its SourceIngest implementor (GooglePlacesIngest) — see ingest's module doc for the full determination and evidence.

the legacy Places API. Not its client (that API is deprecated for new callers, and collectors/google_places.rs already targets the current one) — only its dry-run cost estimator feature, adapted (not verbatim-ported) onto the New API's single-call-per-query shape. See types::DryRunEstimate's doc comment for why the math differs from the source's per-zip "N detail calls" multiplier.

# Example

# async fn example() -> Result<(), infrastructure_adapters_google_places::GooglePlacesError> {
let client = infrastructure_adapters_google_places::GooglePlacesClient::from_api_key("YOUR_API_KEY")?;

// Check the cost before spending anything.
let estimate = client.dry_run_estimate(3);
println!("~${:.2} for {} calls", estimate.estimated_cost_usd, estimate.estimated_calls);

let request = infrastructure_adapters_google_places::TextSearchRequest::new("coffee shops in Austin, TX");
let places = client.search_text(&request).await?;
println!("{} places found", places.len());
# Ok(())
# }

Capabilities

No public items.

How to use it

From this crate's own rustdoc:

# async fn example() -> Result<(), infrastructure_adapters_google_places::GooglePlacesError> {
let client = infrastructure_adapters_google_places::GooglePlacesClient::from_api_key("YOUR_API_KEY")?;

// Check the cost before spending anything.
let estimate = client.dry_run_estimate(3);
println!("~${:.2} for {} calls", estimate.estimated_cost_usd, estimate.estimated_calls);

let request = infrastructure_adapters_google_places::TextSearchRequest::new("coffee shops in Austin, TX");
let places = client.search_text(&request).await?;
println!("{} places found", places.len());
# Ok(())
# }

Module structure

No public modules: the crate root is its whole surface.

Public surface

No public items.

Re-exports. Exported here, defined elsewhere.

ExportDefined in
GooglePlacesConfigauth::GooglePlacesConfig
GooglePlacesErrorerror::GooglePlacesError
{AuthorAttribution,Circle,DisplayName,DryRunEstimate,LatLng,LocationBias,OpeningHours,Place,PlaceReview,PlacesApiError,PlacesApiErrorEnvelope,ReviewText,TextSearchRequest,TextSearchResponse,}types::{AuthorAttribution,Circle,DisplayName,DryRunEstimate,LatLng,LocationBias,OpeningHours,Place,PlaceReview,PlacesApiError,PlacesApiErrorEnvelope,ReviewText,TextSearchRequest,TextSearchResponse,}
{GooglePlacesClient,DEFAULT_FIELD_MASK}client::{GooglePlacesClient,DEFAULT_FIELD_MASK}
{GooglePlacesIngest,GooglePlacesIngestConfig}ingest::{GooglePlacesIngest,GooglePlacesIngestConfig}

Boundary

Reaches into foundation.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, infrastructure-ai, … (82 total).

_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._

Where it sits

Tier (ontology)infrastructure
Architectural role (taxonomy)unclassified (baselined)
Locationcrates/infrastructure/adapters-google-places
Vocabulary in force (lexicon)current

Tier flow. Which tiers this crate's own edges cross.

flowchart LR
  n_infrastructure["infrastructure"] --> n_foundation["foundation"]

Dependencies

Runtime, in this workspace.

CrateTierOptionalOnly on
`foundation-source-ingest`foundationnoalways
`infrastructure-fetcher`infrastructureyesalways

Runtime, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
async-trait^0.1noalways
reqwest^0.12jsonnoalways
serde^1derivenoalways
serde_json^1noalways
thiserror^2noalways
tokio^1sync, timenoalways
tracing^0.1noalways

Development, from outside the workspace.

CrateRequirementFeaturesOptionalOnly on
tokio^1macros, rt-multi-thread, timenoalways
wiremock^0.6noalways

Build. None.

Depended on by. 1 workspace crate.

Signal flow — what reaches this crate, and what it reaches.

flowchart LR
  n_application_party_discovery["application-party-discovery"] -->|uses| SELF
  SELF["infrastructure-adapters-google-places"]
  SELF -->|runtime| n_foundation_source_ingest["foundation-source-ingest"]
  SELF -->|runtime| n_infrastructure_fetcher["infrastructure-fetcher"]
  classDef self fill:#1f883d,stroke:#1f883d,color:#fff;
  class SELF self;

Feature flags

FeatureEnablesOn by default
defaultsecure-egressyes
secure-egressdep:infrastructure-fetcheryes
flowchart LR
  n_default["default"] --> n_secure_egress["secure-egress"]
  n_secure_egress["secure-egress"] --> n_dep_infrastructure_fetcher["dep:infrastructure-fetcher"]

Targets

KindNameSource
libinfrastructure_adapters_google_places`src/lib.rs`

Error model

No public error type was detected: no public item declares a type named *Error, and no public signature returns one.

Operational characteristics

PropertyEvidence
async public surfacenone detected
async runtimeyes
database accessnone detected
network I/Oyes
unsafe codenone detected
environment variablesnone detected

No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.

Configuration

No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.

1 workspace crate depends on this one: application-party-discovery.

Verification

KindCount
Unit tests29
Integration tests0
Examples0
Doctests1

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc00
Public modules with a //! block00

Metrics

MetricValue
Rust source files6
Source lines1174
Code lines822
Public API items0
Public modules0
Tests29
Examples0
Cargo features2
Direct runtime dependencies9
Workspace reverse dependencies1
pie showData
    title Rust source composition
    "Code" : 822
    "Blank or comment" : 352

Generation

Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.

Todas las infrastructure · Manual