Open tdstein opened 6 months ago
IMO:
class ContentItem(Resource):
...
@property
def views(self):
...
I noticed the WebApp makes various calls to an undocumented __metrics__
API endpoint. We should do some digging to determine if those APIs logically go together with the views API. That might help determine if Views are at the "admin" level or the "user" level information.
Add a property to the ContentItem class that retrieves the view metrics for that piece of content. This can be accomplished by modifying the Views resource to optionally accepts a content identifier, and hooking that in as the property.
This could be
content.views
orcontent.metrics.views
. Curently undecided on which makes the most sense for users.