Skip to content

Commit 2e6309f

Browse files
committed
cleanup
1 parent c69b8ff commit 2e6309f

File tree

2 files changed

+14
-5
lines changed

2 files changed

+14
-5
lines changed

src/config/swagger.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const options: swaggerJsdoc.Options = {
88
info: {
99
title: 'Open Podcast Analytics API',
1010
version: version,
11-
description: 'Podcast analytics API providing metrics from Spotify, Apple Podcasts, and custom hosting providers. See https://github.com/openpodcast/api/blob/main/docs/AVAILABLE_QUERIES.md for a complete list of available queries.',
11+
description: 'Podcast analytics API providing metrics from Spotify, Apple Podcasts, and custom hosting providers. Query endpoints are defined as SQL files in db_schema/queries/v1/.',
1212
contact: {
1313
name: 'Open Podcast',
1414
url: 'https://openpodcast.dev',

src/index.ts

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,18 +280,27 @@ app.get(
280280
* get:
281281
* summary: Get analytics data for a podcast
282282
* description: |
283-
* Query analytics data for a specific podcast.
283+
* Query analytics data for a specific podcast using SQL-based query endpoints.
284284
*
285-
* The `query` parameter specifies which metric to retrieve. Common queries include:
285+
* **How it works:** The `query` parameter maps to SQL files in `db_schema/queries/v1/`.
286+
* For example, `reportHosterPlatforms` executes the SQL query defined in
287+
* `db_schema/queries/v1/reportHosterPlatforms.sql`.
288+
*
289+
* **Common queries:**
286290
* - `reportSpotifyPodcastBaseMetrics` - Spotify podcast metrics (streams, listeners, followers)
287291
* - `reportApplePodcastBaseMetrics` - Apple Podcasts metrics (plays, listeners, engagement)
288292
* - `episodesTotalMetrics` - Combined episode metrics across platforms
289293
* - `reportHosterPlatforms` - Platform/app distribution (e.g., Apple Podcasts, Spotify, Overcast)
290294
* - `reportHosterClients` - Client/device distribution
295+
* - `podcastFollowers` - Combined follower counts from all platforms
296+
* - `episodesLTRHistogram` - Listen-through rate histograms per episode
291297
*
292-
* See [AVAILABLE_QUERIES.md](https://github.com/openpodcast/api/blob/main/docs/AVAILABLE_QUERIES.md) for the complete list of 50+ available queries.
298+
* **Output formats:**
299+
* - JSON (default): Returns structured data with metadata
300+
* - CSV: Append `/csv` to the path for CSV export
293301
*
294-
* Results can be returned in JSON (default) or CSV format by appending `/csv` to the path.
302+
* **Available queries:** 50+ SQL queries covering Spotify, Apple Podcasts, cross-platform metrics,
303+
* hoster data, demographics, impressions, and chart rankings.
295304
* tags:
296305
* - Analytics
297306
* parameters:

0 commit comments

Comments
 (0)