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

feat: Add user report endpoints support #307

Conversation

andreichirila0712
Copy link
Contributor

This introduces support for the User Report Settings Templates endpoints. For implementation I focused on reusing the existing Report Settings Templates logic and made the necessary adjustments to handle the user-specific endpoints.

Changes

  • Added the methods to support the User Report Settings Templates endpoints (List, Add, Get, Delete, Edit).
  • Reused logic from the existing Report Settings Template code, with changes to the URLs and parameters.
  • Created 4 new JSON files for the User Report Settings Templates, structured after the existing Report Settings Template files.
  • Added test methods to ensure the new functionality works as expected.

Testing

  • All tests for the added methods pass successfully.
  • In case of Add test method, I set (in the body of method) the isPublic to null since is not part of User Templates.

Additional notes

  • I reused the existing code of Report Settings Template rather than creating a new class since on the documentation I've noticed that the responses (of each template) are quite similar in structure.
  • I've noticed that the JSONs associated with Report Settings Template were a bit modified in comparison with the documentation, so I structured the User Report files based on them.
  • I would appreciate any feedback regarding the implementation or any necessary adjustments.

”Andrei” added 2 commits January 21, 2025 16:45
* Implement list, add, get, delete and edit methods for User Report Settings.
* Ensure compatibility with existing Report Settings logic.
* Added methods to handle User Report Settings Templates endpoints, reusing logic from existing Report Settings Templates methods.
* Implemented tests to ensure the correct functionality of the newly added methods.
* Created 4 JSON files for User Report Settings Templates, following the structure of existing Report Settings Templates.
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.00%. Comparing base (af71abc) to head (98b36b3).

Additional details and impacted files
@@             Coverage Diff              @@
##             master     #307      +/-   ##
============================================
+ Coverage     93.97%   94.00%   +0.03%     
- Complexity      796      801       +5     
============================================
  Files           190      190              
  Lines          2685     2698      +13     
  Branches         54       54              
============================================
+ Hits           2523     2536      +13     
  Misses          136      136              
  Partials         26       26              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@andrii-bodnar andrii-bodnar linked an issue Jan 22, 2025 that may be closed by this pull request
Copy link
Member

@andrii-bodnar andrii-bodnar left a comment

Choose a reason for hiding this comment

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

@andreichirila0712 thank you for the contribution!

@andrii-bodnar andrii-bodnar merged commit def4154 into crowdin:master Jan 22, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add 'User Report Settings Templates' endpoints support
3 participants