MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / getResultsArray

Function getResultsArray

server/src/services/posthog-query.ts:80–85  ·  view source on GitHub ↗
(response: unknown)

Source from the content-addressed store, hash-verified

78
79// eslint-disable-next-line @typescript-eslint/no-explicit-any
80function getResultsArray(response: unknown): any[] {
81 const obj = response as Record<string, unknown> | null;
82 // PostHog query API returns "result" (singular); legacy insights API uses "results" (plural)
83 const arr = obj?.result ?? obj?.results;
84 return Array.isArray(arr) ? arr : [];
85}
86
87const CACHE_TTL_MS = 60 * 60 * 1000; // 1 hour
88let referrerCache: { data: AiReferrerData; timestamp: number } | null = null;

Callers 2

fetchAiReferrerDataFunction · 0.85
fetchPathPageviewCountsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected