-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathspc.d.ts
More file actions
23 lines (19 loc) · 998 Bytes
/
spc.d.ts
File metadata and controls
23 lines (19 loc) · 998 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
export type SpcQueryResponse = ResultsResponse | CommonError;
export type ResultsResponse = {
results: Record<string /* podcast-level keystring */, PodcastMetricsResult | CommonError>
};
export type PodcastMetricsResult = {
asOf: string, // (required) utc timestamp
followerCount?: number, // non-negative integer
totalListeners?: number, // non-negative integer
episodes?: Record<string /* episode guid from rss feed */, EpisodeMetricsResult>
};
export type EpisodeMetricsResult = {
totalListeners?: number, // non-negative integer
listenerHistogramResolutionSeconds?: number, // default is 60, can specify higher-resolution (e.g. 30), but not lower (e.g. 120)
listenerHistogram?: number[], // percentage floats from 0.0 (inclusive) to 100.0 inclusive, one for each minute if listenerHistogramResolution = '1m'
dailyListeners?: Record<string /* utc-day (yyyy-mm-dd) */, number /* non-negative integer */>
};
export type CommonError = {
error: string
};