infrastructure tier

infrastructure-adapters-google-trends

Google Trends adapter — unofficial trends.google.com widget API, no auth token

Google Trends adapter — unofficial trends.google.com widget API, no auth token

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/adapters-google-trends
Edition2021
Targetsinfrastructure_adapters_google_trends
Public items0 across 0 modules
Tests17

What it is for

Google Trends adapter.

A SourceIngest implementor over trends.google.com's unofficial widget API (https://trends.google.com) — see src/client.rs's module doc for the fragility markers this carries (undocumented XSSI-prefixed JSON, no published stability guarantee) that a documented API like Places or Shodan does not have. No authentication of any kind: the source (plumber/src/collectors/google_trends.rs) and this port both rely only on looking like a browser, not on any credential — see src/config.rs's module doc for the evidence trail behind that claim.

Lifted from plumber/src/collectors/google_trends.rs (Gate 4.5 provenance, see CHANGELOG.md). Confirmed against the source directly: GoogleTrendsCollector is one of four sibling files in plumber/src/collectors/ that impl Collector for ... (renamed SourceIngest on this harvest, foundation-source-ingest) — so, unlike infrastructure-adapters-shodan, this crate depends on foundation-source-ingest and GoogleTrendsClient implements it.

# Example

# async fn example() {
use infrastructure_adapters_google_trends::{GoogleTrendsClient, GoogleTrendsConfig};
use foundation_source_ingest::SourceIngest;

let config = GoogleTrendsConfig::new(
vec"plumber near me".to_string(),
"US-AZ",
);
let client = GoogleTrendsClient::new(config).unwrap();
let result = client.ingest().await.unwrap();
println!("collected {} points, {} errors", result.items.len(), result.error_count);
# }

Capabilities

No public items.

How to use it

From this crate's own rustdoc:

# async fn example() {
use infrastructure_adapters_google_trends::{GoogleTrendsClient, GoogleTrendsConfig};
use foundation_source_ingest::SourceIngest;

let config = GoogleTrendsConfig::new(
    vec!["plumber near me".to_string()],
    "US-AZ",
);
let client = GoogleTrendsClient::new(config).unwrap();
let result = client.ingest().await.unwrap();
println!("collected {} points, {} errors", result.items.len(), result.error_count);
# }

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
GoogleTrendsClientclient::GoogleTrendsClient
GoogleTrendsConfigconfig::GoogleTrendsConfig
TrendsErrorerror::TrendsError
{RelatedQuery,TrendPoint}types::{RelatedQuery,TrendPoint}

Boundary

Reaches into foundation.

Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, 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-trends
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
chrono^0.4serdenoalways
rand^0.8noalways
reqwest^0.12json, cookiesnoalways
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. Nothing in this workspace.

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

flowchart LR
  SELF["infrastructure-adapters-google-trends"]
  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_trends`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.

No workspace crate depends on this one.

Verification

KindCount
Unit tests17
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 files5
Source lines1031
Code lines675
Public API items0
Public modules0
Tests17
Examples0
Cargo features2
Direct runtime dependencies11
Workspace reverse dependencies0
pie showData
    title Rust source composition
    "Code" : 675
    "Blank or comment" : 356

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.

All infrastructure · Manual