ShareResponse
Represents the result of a share operation in the Datagrok API. This class encapsulates the status of a share request, including successful shares, already shared items, and failures.
Attributes
| Name | Type | Description |
|---|---|---|
| data | dict | Dictionary containing share response data from the Datagrok API. Expected keys: - 'status' (str): The status of the operation, one of: * 'success' — All items were shared successfully. * 'partial_success' — Some items were shared successfully, some failed. * 'failed' — No items were shared. - 'shared' (list): Items that were successfully shared. - 'alreadyShared' (list): Items that were already shared before the request. - 'failed' (list): Items that failed to be shared. |
| status | str | The overall status of the share operation. |
| shared | list | Items successfully shared. |
| already_shared | list | Items already shared before the request. |
| failed | list | Items that failed to be shared. |
Methods
__init__()
is_success()
Returns True if all items were successfully shared.
is_partial()
Returns True if the operation had both successes and failures.
is_failed()
Returns True if the operation failed entirely
raise_for_failure()
Raises a RuntimeError if the operation failed.