-
Notifications
You must be signed in to change notification settings - Fork 42
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
formatted SDK & added NCW endpoints #125
Conversation
def get_users_groups(self) -> List[Dict[str, Any]]: | ||
""" | ||
Gets all Users Groups for your tenant | ||
""" | ||
|
||
url = "/v1/users_groups" | ||
|
||
return self._get_request(url) | ||
|
||
def get_users_group(self, id: str) -> Dict[str, Any]: | ||
""" | ||
Gets a Users Group by ID | ||
@param id: The ID of the User | ||
""" | ||
|
||
url = f"/v1/users_groups/{id}" | ||
|
||
return self._get_request(url) | ||
|
||
def create_user_group(self, group_name: str, member_ids: Optional[List[str]] = None) -> Dict[str, Any]: | ||
""" | ||
Creates a new Users Group | ||
@param group_name: The name of the Users Group | ||
@param member_ids: The ids of the Users Group members | ||
""" | ||
|
||
url = "/v1/users_groups" | ||
|
||
body = { | ||
"groupName": group_name, | ||
"memberIds": member_ids | ||
} | ||
|
||
return self._post_request(url, body) | ||
|
||
def update_user_group(self, id: str, group_name: Optional[str] = None, member_ids: Optional[List[str]] = None) -> Dict[str, Any]: | ||
""" | ||
Updates a Users Group | ||
@param id: The ID of the Users Group | ||
@param group_name: The name of the Users Group | ||
@param member_ids: The ids of the Users Group members | ||
""" | ||
|
||
url = f"/v1/users_groups/{id}" | ||
|
||
body = { | ||
"groupName": group_name, | ||
"memberIds": member_ids | ||
} | ||
|
||
return self._put_request(url, body) | ||
|
||
def delete_user_group(self, id: str) -> None: | ||
""" | ||
Deletes a Users Group | ||
@param id: The ID of the Users Group | ||
""" | ||
|
||
url = f"/v1/users_groups/{id}" | ||
|
||
return self._delete_request(url) | ||
|
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.
Why did you remove the /users_groups
methods?
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.
It was a mistake, due to the PR existing for a long time, we should put them back
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.
No description provided.