togglr icon indicating copy to clipboard operation
togglr copied to clipboard

Get workspace IDs

Open svraka opened this issue 3 years ago • 0 comments

As already noted by @VincentGuyader in a comment in get_workspace_id(), currently there's no way to query all workspace IDs from togglr.

As far as I understand, get_workspace_id() is used in many functions throughout the package to fetch the first workspace ID of an account which might not even be the default. Fortunately there's a me API endpoint, which returns info on all workspaces (similarly to the workspaces endpoint) but this also includes a field on which workspace is set as default.

I'm not sure what is the best approach to add this functionality to the packages. Without introducing significant braking changes, get_workspace_id() could gain a default_workspace argument, defaulting to TRUE (presumably most togglr users have only one workspace). However, the function name get_workspace_id() would be a bit misleading.

BTW, great package!

svraka avatar Jul 13 '20 22:07 svraka