Skip to content
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

Get deleted API for apps, groups, and users #51

Merged
merged 6 commits into from
May 27, 2021
Merged

Get deleted API for apps, groups, and users #51

merged 6 commits into from
May 27, 2021

Conversation

tsologub
Copy link
Contributor

Add support for retrieving deleted applications, groups, and users. (i.e. basically this page)

Notes to the reviewer:
I wasn't quite sure how to approach this, as it is basically a code duplication. The HTTP request is the same (/directory/deletedItems), but different types will be returned in the end. I was thinking of introducing a msgraph/directory.go with GetDeleted(), but that didn't feel right. So I decided to keep this decoupled under separate clients, even if it is a code duplication somehow.

p.s. Groups without tests for the same (#48) reason.

@manicminer manicminer added the enhancement New feature or request label May 27, 2021
Copy link
Owner

@manicminer manicminer left a comment

Choose a reason for hiding this comment

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

Thanks again for this @tsologub. I think this approach is fine for now. I've been thinking about improving handling of generic directory objects but I feel this needs a few use cases first to get it right. Some code duplication is perfectly ok if it reads or works better.

msgraph/applications.go Outdated Show resolved Hide resolved
msgraph/groups.go Outdated Show resolved Hide resolved
msgraph/users.go Outdated Show resolved Hide resolved
@manicminer manicminer added this to the v0.14.0 milestone May 27, 2021
@manicminer manicminer merged commit 35638d9 into manicminer:main May 27, 2021
manicminer added a commit that referenced this pull request May 27, 2021
@tsologub tsologub deleted the feature/get-deleted branch May 27, 2021 16:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants