Get a specific group in the Remote by its id .. note:: If groups have not been pulled, they will be pulled upon calling this. .. note:: This function is only available to accounts with admin status on the Remote :param id: Id of Group :return: Group object, if one with that id exists.
(self, id: int)
| 449 | return result |
| 450 | |
| 451 | def get_group_by_id(self, id: int) -> Optional['group.Group']: |
| 452 | """ |
| 453 | Get a specific group in the Remote by its id |
| 454 | |
| 455 | .. note:: If groups have not been pulled, they will be pulled upon calling this. |
| 456 | |
| 457 | .. note:: This function is only available to accounts with admin status on the Remote |
| 458 | |
| 459 | :param id: Id of Group |
| 460 | :return: Group object, if one with that id exists. Else, None |
| 461 | :raises: RuntimeError if there was an error pulling groups |
| 462 | """ |
| 463 | if not self.has_pulled_groups: |
| 464 | self.pull_groups() |
| 465 | |
| 466 | value = core.BNRemoteGetGroupById(self._handle, id) |
| 467 | if value is None: |
| 468 | return None |
| 469 | return group.Group(value) |
| 470 | |
| 471 | def get_group_by_name(self, name: str) -> Optional['group.Group']: |
| 472 | """ |
nothing calls this directly
no test coverage detected