-
Notifications
You must be signed in to change notification settings - Fork 4
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: adds usage #166
feat: adds usage #166
Conversation
☂️ Python Coverage
Overall Coverage
New Files
Modified Files
|
def find( | ||
self, | ||
content_guid: str = ..., | ||
min_data_version: int = ..., |
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.
Do you have a test for something other than the default for min_data_version
? Something that is a bit funny is that though the parameter is the same, for shiny the default (and max) is 1, for not-shiny content the default (and max) is 3
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.
These arguments are passed through as query parameters to the server, which performs all validation. If the server responds with a failure, then a ClientError is raised.
>>> from posit import connect
>>> c = connect.Client()
>>> event = c.usage.find_one(min_data_version=-1)
Traceback (most recent call last):
...
posit.connect.errors.ClientError: The parameter min_data_version=-1 is less than the allowed minimum 0 (Error Code: 25, HTTP Status: 400 Bad Request)
This is more or less a copy of the
visits
implementation.I am considering the best way to facade these resources behind a single interface. See #167