on_resource_list Event
Fires once for each resource returned when listing resources or changes.
Syntax
class OneDriveResourceListEventParams(object): @property def id() -> str: ... @property def name() -> str: ... @property def path() -> str: ... @property def description() -> str: ... @property def resource_type() -> int: ... @property def created_time() -> str: ... @property def modified_time() -> str: ... @property def size() -> int: ... @property def e_tag() -> str: ... @property def deleted() -> bool: ... # In class OneDrive: @property def on_resource_list() -> Callable[[OneDriveResourceListEventParams], None]: ... @on_resource_list.setter def on_resource_list(event_hook: Callable[[OneDriveResourceListEventParams], None]) -> None: ...
Remarks
This event fires once for each resource returned when list_resources, get_resource_info, search, or list_changes is called.
Id is the Id of the resource.
Name is the name of the resource.
Path is the path to the resource on the server. This parameter will always be empty for list_changes.
Description holds the description of the resource. This parameter is only applicable for OneDrive Personal.
ResourceType reflects the resource's type. Possible values are:
0 (odrtFile) | A file. |
1 (odrtFolder) | A folder. |
CreatedTime and ModifiedTime reflect the resource's creation and last modified timestamps. Timestamps are formatted according to ISO 8601 and are always in UTC time.
Size is the size of the resource (for folders, their contents' total size), in bytes. This parameter will always be -1 for list_changes.
ETag is the ETag of the resource.
Deleted indicates whether the resource has been deleted. This parameter is only applicable for list_changes, it will always be False otherwise.