Widgets
¤
find_all_widgets(container, **params)
¤
Find and return all widgets in the container that respect the filters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
container |
Dict[str, Any] |
The container of the widgets, that could be a content, community, the components of a content or the template of a content |
required |
Kwargs
params: params to filter on (eg, widgetType='video' will find athe first video widget in the given container)
Returns:
Type | Description |
---|---|
List[Dict[str, Any]] |
The list of all found widgets |
Source code in lumapps/api/helpers/widgets.py
27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
|
find_widget(container, **params)
¤
Find and return the first widget in the container that respect the filters
Parameters:
Name | Type | Description | Default |
---|---|---|---|
container |
Dict[str, Any] |
The container of the widgets, that could be a content, community, the components of a content or the template of a content |
required |
Kwargs
params: params to filter on (eg, widgetType='video' will find athe first video widget in the given container)
Returns:
Type | Description |
---|---|
Optional[Dict[str, Any]] |
The first found widget |
Source code in lumapps/api/helpers/widgets.py
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
|