openpodcast / api

OpenPodcast API server
https://openpodcast.dev
8 stars 2 forks source link

fetch historical apple data #156

Open woolfg opened 10 months ago

woolfg commented 10 months ago

similar to #134 but apple.

seems to be the only part of "today" data

            accountId,
            episodeId,
            this.getTodayDBString(),
            episodeDetails.episodePlayCountAllTime.playscount,
            episodeDetails.episodePlayCountAllTime.totaltimelistened,
            episodeDetails.episodePlayCountAllTime.uniqueengagedlistenerscount,
            episodeDetails.episodePlayCountAllTime.uniquelistenerscount,
            episodeDetails.episodePlayCountAllTime.engagedplayscount,
            JSON.stringify(episodeDetails.episodePlayHistogram),
            JSON.stringify(episodeDetails.showTopCities),
            JSON.stringify(episodeDetails.showTopCountries),
            calculatedQuarterMedianValues.maxListeners,
            calculatedQuarterMedianValues.quarterMedianValues[0],
            calculatedQuarterMedianValues.quarterMedianValues[1],
            calculatedQuarterMedianValues.quarterMedianValues[2],
            calculatedQuarterMedianValues.quarterMedianValues[3],
        ])

data coming from:

apple_connector.episode

woolfg commented 10 months ago

Those values can't be fetched for a specific daterange (see Episode.md and EpisodeDetails.md in internal docs).

It is possible to fetch basic data agrregated by weeks and months, so we could store aggregated values for a specific date range (in this case just weekly and monthly). In the db we would have a start and end date and the aggregated values.

mre commented 9 months ago

clarified with @woolfg :

seems to be the only part of "today" data

means no start/end date can be chosen, but all-time.

mre commented 9 months ago