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

Access metrics.Views from Content? #182

Open
nealrichardson opened this issue Apr 24, 2024 · 1 comment
Open

Access metrics.Views from Content? #182

nealrichardson opened this issue Apr 24, 2024 · 1 comment
Labels
enhancement New feature or request sdk Used for automation

Comments

@nealrichardson
Copy link
Collaborator

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?

@tdstein
Copy link
Collaborator

tdstein commented Apr 26, 2024

Oh, I see now; that makes sense since the views are scoped to content.

@tdstein tdstein added the enhancement New feature or request label Apr 26, 2024
@tdstein tdstein added this to the 0.4.0 milestone Apr 26, 2024
@tdstein tdstein removed this from the 0.4.0 milestone Sep 4, 2024
@tdstein tdstein added the sdk Used for automation label Sep 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sdk Used for automation
Projects
None yet
Development

No branches or pull requests

2 participants