Skip to content

Add getReactionStats Method for Time-Based Analysis #12

@Silent-Watcher

Description

@Silent-Watcher

Feature: Add getReactionStats Method for Time Periods

Description:
Add a method getReactionStats(reactableId, startDate, endDate) that returns reaction counts broken down by time periods (e.g., daily or weekly) within a date range.

Acceptance Criteria:

  • Method exists: Model.getReactionStats(reactableId, startDate, endDate, interval?).
  • Returns an array of objects with date, reaction, and count properties.
  • The interval parameter can be day, week, or month.
  • Uses MongoDB's date aggregation operators.
  • Tests are added for this method.
  • Add usage examples in docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions