Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

analytics #695

Merged
merged 5 commits into from
Sep 13, 2023
Merged

analytics #695

merged 5 commits into from
Sep 13, 2023

Conversation

thesuzerain
Copy link
Contributor

No description provided.

Comment on lines 239 to 254
/// Get country data for a set of projects or versions
/// Data is returned as a hashmap of project/version ids to a hashmap of coutnry to views + downloads.
/// Unknown countries are labeled "".
/// This is usuable to see significant performing countries per project
/// eg:
/// {
/// "4N1tEhnO": {
/// "CAN": {
/// total_views: 3213
/// total_downloads: 22
/// }
/// }
///}
/// Either a list of project_ids or version_ids can be used, but not both. Unauthorized projects/versions will be filtered out.
/// For this endpoint, provided dates are a range to aggregate over, not specific days to fetch
#[get("countries")]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should separate this into separate routes based on datatype

/// {
/// "4N1tEhnO": {
/// "20230824": {
/// "day": 20230824,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should only include the total seconds per day for this to keep it simple for now. We can expose more data later on. Should simplify your query a lot.

@thesuzerain thesuzerain marked this pull request as ready for review September 12, 2023 19:20
@Geometrically Geometrically merged commit 35cd277 into master Sep 13, 2023
6 of 8 checks passed
@Geometrically Geometrically deleted the analytics branch September 13, 2023 23:35
thesuzerain added a commit that referenced this pull request Dec 5, 2023
* playtime

* other routes, improvements

* fmt clippy

* revs

---------

Co-authored-by: Geometrically <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants