Activities
albert.collections.activities.ActivityCollection
Bases: BaseCollection
ActivityCollection is a collection class for managing viewing activities across Albert platform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
AlbertSession
|
The Albert session instance. |
required |
Methods:
Name | Description |
---|---|
get_all |
Lists Activity entities with optional filters |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
Source code in src/albert/collections/activities.py
get_all
get_all(
*,
type: ActivityType,
id: str | None = None,
start_date: date | None = None,
end_date: date | None = None,
operation_id: ActivityOperationId | None = None,
action: ActivityAction | None = WRITE,
order_by: OrderBy | None = DESCENDING,
start_key: str | None = None,
max_items: int | None = None,
) -> Iterator[Activity]
Lists Activity entities with optional filters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
type
|
ActivityType
|
The type of Id for which activities will be fetched. |
required |
start_key
|
str | None
|
The primary key of the first item that this operation will evaluate. |
None
|
id
|
str | None
|
Unique id value for the selected type. This field is not supported for ActivityType.DATE_RANGE type, by default None |
None
|
start_date
|
date | None
|
The start date of the activities to list, by default None |
None
|
end_date
|
date | None
|
The end date of the activities to list, by default None |
None
|
action
|
ActivityAction | None
|
List activities with read/write operations, by default ActivityAction.WRITE |
WRITE
|
order_by
|
OrderBy | None
|
The order by which to sort the results, by default OrderBy.DESCENDING |
DESCENDING
|
operation_id
|
ActivityOperationId | None
|
OperationId of id for which activities will be fetched. Applicable only for recency support of sds/bl, by default ActivityOperationId.POST_SDS |
None
|
max_items
|
int
|
Maximum number of items to return in total. If None, fetches all available items. |
None
|
Returns:
Type | Description |
---|---|
Iterator[Activity]
|
An iterator of Activity objects. |