Links
albert.collections.links.LinksCollection
Bases: BaseCollection
LinksCollection is a collection class for managing Link entities in the Albert platform.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
session
|
AlbertSession
|
The Albert session instance. |
required |
Methods:
Name | Description |
---|---|
create |
Creates a new link entity. |
list |
Generates a list of link entities with optional filters. |
get_by_id |
Retrieves a link entity by its ID. |
delete |
Deletes a link entity by its ID. |
Attributes:
Name | Type | Description |
---|---|---|
base_path |
|
Source code in src/albert/collections/links.py
create
Creates a new link entity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
links
|
list[Link]
|
List of Link entities to create. |
required |
Returns:
Type | Description |
---|---|
Link
|
The created link entity. |
Source code in src/albert/collections/links.py
list
list(
*,
limit: int = 100,
type: str | None = None,
category: LinkCategory | None = None,
id: str | None = None,
) -> Iterator[Link]
Generates a list of link entities with optional filters.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
limit
|
int
|
The maximum number of link entities to return. |
100
|
type
|
str
|
The type of the link entities to return. Allowed values are |
None
|
category
|
LinkCategory
|
The category of the link entities to return. Allowed values are |
None
|
id
|
str
|
The ID of the link entity to return. (Use with |
None
|
Returns:
Type | Description |
---|---|
Iterator[Link]
|
An iterator of Links. |