basic Data Provider
The basic Data Provider uses your own bespoke JSON format to populate data.
"data": {
"type": "basic",
"src": [
{ "foodname.text": "Banana" },
{ "foodname.text": "Apple" }
]
}
Properties
- src
- ARRAY
- Required
The data as an array of OBJECTs.
Note
When providing data entries, the uid key is reserved. This is used for e.g. filtering and reselection.
- filter
- OBJECT
The configuration for the filter of this provider.
- type
- ENUM
- Default:
"basic"
The type of this filter.
| Value |
Description |
"basic" |
Basic filter uses Alfred's internal high-performance word search algorithm. |
- modify
- OBJECT
Modify the existing data
- insert
- OBJECT
Configuration for inserting data into the existing data.
- position
- ENUM
- Default:
"after"
Insert before or after the given uid. If no uid is provided, data will be inserted at the beginning or end of the existing data.
| Value |
Description |
"after" |
Insert after the given uid |
"before" |
Insert before the given uid |
- uid
- STRING
The uid of data to insert before or after.
- autoselect
- BOOL
- Default:
true
Reselect the first item inserted.
- src
- ARRAY
The data to insert in the same format as the main src key.
- replace
- OBJECT
Configuration for replacing data in the existing data.
- autoselect
- BOOL
- Default:
true
Select the index of the first replaced object.
- srcmap
- OBJECT
A map of uid to src. Matching uids will be replaced, non-matching will be ignored.
- delete
- OBJECT
Configuration for removing data from the existing data
- autoselect
- BOOL
- Default:
true
Reselect the cell at the same index after deleting.
- uids
- ARRAY
An array of uid values to delete rows for.