Skip to content

Conversation

@brandon-wada
Copy link
Collaborator

Addresses Feature request: Whoami? #64

Copy link
Member

@robotrapta robotrapta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Is this just using the current /me endpoint used by reef? And this is almost all generated code?

Also we should use this call in Groundlight._verify_connectivity instead of list_detectors and then we can remember who the logged in user is, and include that in the __repr__ string so if you say

gl = groundlight.Groundlight() 
print(gl)

it prints out the currently logged in username. Doesn't need to be in this PR.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this all auto-generated?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, it's mostly generated! It's neat how powerful the openapi standard is, and since we have the /me endpoint for reef this turns out to be super straightforward.

I like the rec on _verify_connectivity and __repr__, I'll add those in the next PR

…e package.json (and all of the generated code accordingly)
@brandon-wada brandon-wada merged commit 237f12c into main Feb 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants