aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs/configuration.md
diff options
context:
space:
mode:
authorBastien Wirtz <bastien.wirtz@gmail.com>2021-03-04 18:40:07 -0800
committerGitHub <noreply@github.com>2021-03-04 18:40:07 -0800
commitcc7ff885527283d97f32347210b0370e8477c4ff (patch)
tree6c2eda44ed25cf2cd91cced7ab159ecd5e6735f7 /docs/configuration.md
parent7bcfce6bdad32ec392279867af7f3f3c67a972b3 (diff)
parent9542de6eb25bfa20b376920b607db864c9e20a7a (diff)
downloadhomer-cc7ff885527283d97f32347210b0370e8477c4ff.tar.gz
homer-cc7ff885527283d97f32347210b0370e8477c4ff.tar.zst
homer-cc7ff885527283d97f32347210b0370e8477c4ff.zip
Merge pull request #175 from luixal/message-remote-fields-mappingv21.03.1
Adds mapping remote field to Homer expected ones when loading message from URL
Diffstat (limited to 'docs/configuration.md')
-rw-r--r--docs/configuration.md13
1 files changed, 12 insertions, 1 deletions
diff --git a/docs/configuration.md b/docs/configuration.md
index a43d7f1..5785e56 100644
--- a/docs/configuration.md
+++ b/docs/configuration.md
@@ -66,6 +66,17 @@ colors:
66# Optional message 66# Optional message
67message: 67message:
68 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below. 68 # url: "https://<my-api-endpoint>" # Can fetch information from an endpoint to override value below.
69 # mapping: # allows to map fields from the remote format to the one expected by Homer
70 # title: 'id' # use value from field 'id' as title
71 # content: 'value' # value from field 'value' as content
72 # refreshInterval: 10000 # Optional: time interval to refresh message
73 #
74 # Real example using chucknorris.io for showing Chuck Norris facts as messages:
75 # url: https://api.chucknorris.io/jokes/random
76 # mapping:
77 # title: 'id'
78 # content: 'value'
79 # refreshInterval: 10000
69 style: "is-warning" 80 style: "is-warning"
70 title: "Optional message!" 81 title: "Optional message!"
71 icon: "fa fa-exclamation-triangle" 82 icon: "fa fa-exclamation-triangle"
@@ -118,7 +129,7 @@ services:
118 # background: red # optional color for card to set color directly without custom stylesheet 129 # background: red # optional color for card to set color directly without custom stylesheet
119``` 130```
120 131
121If you choose to fetch message information from an endpoint, the output format should be: 132If you choose to fetch message information from an endpoint, the output format should be as follows (or you can [custom map fields as shown in tips-and-tricks](./tips-and-tricks.md#mapping-fields)):
122 133
123```json 134```json
124{ 135{