diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/configuration.md | 4 | ||||
-rw-r--r-- | docs/tips-and-tricks.md | 14 |
2 files changed, 9 insertions, 9 deletions
diff --git a/docs/configuration.md b/docs/configuration.md index 8bff54f..5785e56 100644 --- a/docs/configuration.md +++ b/docs/configuration.md | |||
@@ -69,7 +69,7 @@ message: | |||
69 | # mapping: # allows to map fields from the remote format to the one expected by Homer | 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 | 70 | # title: 'id' # use value from field 'id' as title |
71 | # content: 'value' # value from field 'value' as content | 71 | # content: 'value' # value from field 'value' as content |
72 | # refreshInterval: 10000 # time interval to refresh message | 72 | # refreshInterval: 10000 # Optional: time interval to refresh message |
73 | # | 73 | # |
74 | # Real example using chucknorris.io for showing Chuck Norris facts as messages: | 74 | # Real example using chucknorris.io for showing Chuck Norris facts as messages: |
75 | # url: https://api.chucknorris.io/jokes/random | 75 | # url: https://api.chucknorris.io/jokes/random |
@@ -129,7 +129,7 @@ services: | |||
129 | # 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 |
130 | ``` | 130 | ``` |
131 | 131 | ||
132 | If you choose to fetch message information from an endpoint, the output format should be: | 132 | If 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)): |
133 | 133 | ||
134 | ```json | 134 | ```json |
135 | { | 135 | { |
diff --git a/docs/tips-and-tricks.md b/docs/tips-and-tricks.md index 63eeeaf..94167fb 100644 --- a/docs/tips-and-tricks.md +++ b/docs/tips-and-tricks.md | |||
@@ -145,9 +145,9 @@ Now, you can do that using the `mapping` field in your `message` configuration. | |||
145 | ```yml | 145 | ```yml |
146 | message: | 146 | message: |
147 | url: https://api.chucknorris.io/jokes/random | 147 | url: https://api.chucknorris.io/jokes/random |
148 | mapping: | 148 | mapping: |
149 | title: 'id' | 149 | title: 'id' |
150 | content: 'value' | 150 | content: 'value' |
151 | ``` | 151 | ``` |
152 | 152 | ||
153 | As you would see, using the ID as a title doesn't seem nice, that's why when a field is empty it would keep the default values, like this: | 153 | As you would see, using the ID as a title doesn't seem nice, that's why when a field is empty it would keep the default values, like this: |
@@ -155,8 +155,8 @@ As you would see, using the ID as a title doesn't seem nice, that's why when a f | |||
155 | ```yml | 155 | ```yml |
156 | message: | 156 | message: |
157 | url: https://api.chucknorris.io/jokes/random | 157 | url: https://api.chucknorris.io/jokes/random |
158 | mapping: | 158 | mapping: |
159 | content: 'value' | 159 | content: 'value' |
160 | title: "Chuck Norris Facts!" | 160 | title: "Chuck Norris Facts!" |
161 | ``` | 161 | ``` |
162 | 162 | ||
@@ -165,8 +165,8 @@ and even an error message in case the `url` didn't respond or threw an error: | |||
165 | ```yml | 165 | ```yml |
166 | message: | 166 | message: |
167 | url: https://api.chucknorris.io/jokes/random | 167 | url: https://api.chucknorris.io/jokes/random |
168 | mapping: | 168 | mapping: |
169 | content: 'value' | 169 | content: 'value' |
170 | title: "Chuck Norris Facts!" | 170 | title: "Chuck Norris Facts!" |
171 | content: "Message could not be loaded" | 171 | content: "Message could not be loaded" |
172 | ``` | 172 | ``` |