-
Notifications
You must be signed in to change notification settings - Fork 1
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) implement video new downloads endpoint #44
Conversation
Note: I suggest unifying the naming of
The most suitable option among them is |
@jmaupetit, let's discuss refactoring. Although we maintain the duplication for the indicators, I strongly recommend abstracting the views and downloads models into more general pydantic models to reduce duplication. These models are quite naive. |
I would suggest |
I do agree! |
a6ce217
to
53000c8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As you proposed a new indicator, we clearly see that we need to think a bit more our semantic and factoring. Thank you for highlighting this. 💪 😎
53000c8
to
8df9b55
Compare
Upgrade ralph-malp to import a new xAPI verb. Downloaded, from tincanapi is required to add the new endpoint downloads.
Enhance engagement metrics by implementing a new endpoint to track download events on video resources. This endpoint queries an LRS for statements with the 'Downloaded' xAPI verb (http://id.tincanapi.com/verb/downloaded). The endpoint provides both a total count of events and a daily count for studying download patterns.
To improve clarity and avoid confusion, we propose unifying the naming of actor.uuid to use uid throughout the codebase. This change will provide a consistent and clear representation, emphasizing that the identifier is unique, though not necessarily universal.
Current specific classes were not adding significant value beyond the proposed base DailyCount and DailyCounts classes. They served as aliases with different names, which led to redundant code.
video_id was renamed to video_uuid whithout thorough attention. Align all existing API tests.
After sutdying some raw statements from ralph, I noticed that statements' timestamps were stored as date and time string with an offset from UTC, and not as UTC.
Current tests are following the exact same structure as the `views` ones. Please note that these tests are a basis and should be extended with more advanced one as soon as the API complexity and usage increase.
8df9b55
to
97e6e57
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Purpose
Implement a
downloads
endpoint for the video plugin, inspired by @lebrunthibault's work in PR #28.Proposal
Closes #24
Downloads events are described by the xAPI verb
Downloaded
from tincanapi. This xAPI verb is available inralph-malp==3.8.0
.This new endpoint follows the same code structure as the
views
one, implemented by @cyrillay.3.8
.downloads
Models.downloads
Indicator.downloads
Endpoint.