mirror of
https://github.com/gethomepage/homepage.git
synced 2025-12-07 09:35:54 -08:00
Feature: Support selecting the top level of a Custom API response
Some APIs return arrays at the top. With this change, a customapi widget can select the top level object/array. This is particularly useful when combined with the `size` formatter, but can also be used for APIs that return scalar values directly.
This commit is contained in:
@@ -57,6 +57,9 @@ widget:
|
||||
- field: key
|
||||
label: Number of things in array
|
||||
format: size
|
||||
- field: . # This will take the root of the API response, e.g. when APIs return an array
|
||||
label: Number of items
|
||||
format: size
|
||||
```
|
||||
|
||||
Supported formats for the values are `text`, `number`, `float`, `percent`, `bytes`, `bitrate`, `size`, `date` and `relativeDate`.
|
||||
|
||||
Reference in New Issue
Block a user