Skip to content

Access metrics.Views from Content? #182

Open
@nealrichardson

Description

@nealrichardson

From #170 (comment), I feel like I wasn't conveying well that I was referring to Content and not ContentItem in bullet 2. Feel free to close if you hate the idea.

Currently, to get Views, you get .metrics from Client, and then .views from that. What if instead of going through .metrics you went through .content since Views are all about content:

class Content(Resources):
    ...
    @property
    def views(self) -> metrics.views.Views:
        return metrics.views.Views(self.config, self.session)

It's still across all content, unlike #181. It's just a question of ergonomics: do I expect to find all content metrics from something under .content or somewhere else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestsdkUsed for automation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions