This repository has been archived by the owner on Sep 13, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
list all content by a user #29
Merged
kmasiello
merged 6 commits into
main
from
11-recipe-list-all-content-by-a-userset-of-usersgroups
Apr 27, 2024
Merged
list all content by a user #29
kmasiello
merged 6 commits into
main
from
11-recipe-list-all-content-by-a-userset-of-usersgroups
Apr 27, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tdstein
approved these changes
Apr 22, 2024
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.
Python bits look good. Can't speak for the R content.
content/content-by-user/index.qmd
Outdated
Comment on lines
87
to
92
user_guid = client.users.find_one(prefix = username).guid | ||
#TODO: update `prefix` per https://github.com/posit-dev/posit-sdk-py/issues/173 | ||
|
||
### Get list of content owned by specified user | ||
content = pl.DataFrame(client.content.find(owner_guid=user_guid)) | ||
content |
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.
Another way we can approach this is by adding functionality to the SDK. What do you think?
client.users.find_one(prefix=username).content.find()
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.
that's pretty slick too. Might be more efficient to run this way as well, depending on how much content is on the server compared to the number of users.
kmasiello
deleted the
11-recipe-list-all-content-by-a-userset-of-usersgroups
branch
April 27, 2024 00:55
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Addresses #11
Only did this for a single user. The issue stated "for a set of users / group" but:
a) groups do not own content
b) the recipe can be iterated by the end user to get content for multiple users.
If there's a strong desire to see this modified to list content by multiple users, LMK