Description
-
The plugin stores user-specific lists of strings (favorites) for types (favorite-type)
-
Anonymous calls are not allowed
-
The favorite-types are configured in the
config.yml(cross project) -
The names of the favorite-types can contain letters, numbers, underscores and dashes
-
The following REST calls are supported
-
Get all values for a favorite-type
-
Add single value to favorite-type
-
Remove single value from favorite-type
-
Overwrite all values for favorite-type
-
REST API
Get favorites
GET /api/v1/[project]/plugins/favorite/[type]
Returns
{
"favorites": [
"my_widget3",
"my_widget2"
]
}
Add value to favorites
POST /api/v1/[project]/plugins/favorite/[type]/[value]
Remove value from favorites
DELETE /api/v1/[project]/plugins/favorite/[type]/[value]
If duplicates are allowed, all occurrences of the value will be removed.
Overwrite favorite values
POST /api/v1/[project]/plugins/favorite/[type]
{
"favorites": [
"my_widget3",
"my_widget2"
]
}
Installation
Unresolved directive in <stdin> - include::content/premium-features/_plugin_install.adoc[]
Configuration
projects:
- "project_1"
- "project_2"
types:
widgets:
maxEntries: -1
allowDuplicates: false
reorderDuplicates: false
addToList: append
infobox:
maxEntries: -1
allowDuplicates: false
reorderDuplicates: false
addToList: append
ongoing_procedures:
maxEntries: 3
allowDuplicates: false
reorderDuplicates: true
addToList: append
| Key | Type | Description | Default value |
|---|---|---|---|
projects |
array of strings |
Project names, for which the plugin is activated |
REQUIRED |
types |
array of objects |
Available types with their configuration |
REQUIRED |
maxEntries |
integer |
Maximum number of entries stored for the type. -1 for unbounded |
-1 |
allowDuplicates |
boolean |
Flag to allow duplicate values for the type |
false |
reorderDuplicates |
boolean |
Flag to specify behaviour for POSTed
duplicates, if |
false |
addToList |
|
POSTed values will be added at
the end ( |
|
Disclaimer: This plugin does not support parallel requests on the same favorite type!
