connectapi
connectapi copied to clipboard
feat: `connect_user` S3 class
Creates new S3 classes connect_user and connect_users. Functions that previously took a user GUID as an argument now can take either the GUID or the connect_user object.
This is still a draft while we talk through the right approach for phasing in this new object and moving away from the data frame-centric return object of get_users().
- For now
get_users()still returns a data frame. -
get_users_list()returns a list ofconnect_userobjects;get_users()just callsget_users_list()and converts to a data frame. I don't love this naming at all. - Arguments that were previously named
user_guid,owner_guid, etc. are nowuser/ownerto reflect the fact that they can be either the GUID or object. This may be a pretty significant breaking change but it also doesn't seem right to keep_guidin there when it might not be a guid.
I'm a little tempted to deprecate passing the GUID strings with a warning, and then a few releases down the line remove support for passing the GUID. At the same time we can maybe swap get_users() to returning a list and remove/deprecate get_users_list(). Would love others' thoughts as they look at this though, I think there are a lot of potential options.
Checklist
- [ ] Does this change update
NEWS.md(referencing the connected issue if necessary)? - [ ] Does this change need documentation? Have you run
devtools::document()?