Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] Get comment stats in date range #13

Open
bodynar opened this issue Oct 14, 2021 · 0 comments
Open

[API] Get comment stats in date range #13

bodynar opened this issue Oct 14, 2021 · 0 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@bodynar
Copy link
Owner

bodynar commented Oct 14, 2021

Use #10, after #12

Add API for gathering comment appearance count change in specific data range.
Represent data as pairs of values:

  • key: date \ interval value
  • value: appearance count for specific date

API should get 3 values:

  • Start date
  • End date (must be greater than start date)
  • Interval type (day \ week \ month \ year)
    Third parameter should be used for grouping count.

Restrictions for intervals: Do not perform execution if difference between dates is:

  • Day - More than 30 days
  • Week - More than 30 weeks
  • Month - More than 30 month

Example:

  • 01-01-2020
  • 30-01-2020
  • Week
    API should return:
[
    { "commentId": [
        { "date": 01-01-2020, "value": 10 }, // Appearance count = 10 on 01-01-2020
        { "date": 08-01-2020, "value": 11 }, // Appearance count = 11 on 08-01-2020
        { "date": 15-01-2020, "value": 21 }, // Appearance count = 21 on 15-01-2020
        { "date": 22-01-2020, "value": 25 }, // Appearance count = 25 on 22-01-2020
        { "date": 29-01-2020, "value": 26 }, // Appearance count = 26 on 29-01-2020
        { "date": 30-01-2020, "value": 26 }, // Appearance count = 26 on 30-01-2020
     ] },
     // ...
]

If end date is not captured in last full interval (like week, but it's 1 day, like in example above) - it should be added as another value with end date

@bodynar bodynar assigned bodynar and unassigned bodynar Oct 14, 2021
@bodynar bodynar added the enhancement New feature or request label Oct 14, 2021
@bodynar bodynar added this to the v1.2 milestone Oct 14, 2021
@bodynar bodynar modified the milestones: v1.2, v1.3 Jul 14, 2022
@bodynar bodynar modified the milestones: v1.4, backlog Jan 10, 2024
@bodynar bodynar changed the title [Stats] Get comment stats in date range [API] Get comment stats in date range Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant