From da97948088eabc5f809f7a7c277c0fd836980485 Mon Sep 17 00:00:00 2001 From: nyangogo <7449028+miawgogo@users.noreply.github.com> Date: Wed, 22 May 2024 14:35:35 +0100 Subject: [PATCH] Update docs for `Notifications for Android TV / Fire TV` for changes made to service data for icons and images (#31228) * nfandroidtv - updated docs for my changes and removed a bunch of redundant examples * nfandroidtv - ran a formatter * nfandroidtv - clarified the sections purpose * Apply suggestions from code review --------- Co-authored-by: c0ffeeca7 <38767475+c0ffeeca7@users.noreply.github.com> --- source/_integrations/nfandroidtv.markdown | 63 +++++++++-------------- 1 file changed, 24 insertions(+), 39 deletions(-) diff --git a/source/_integrations/nfandroidtv.markdown b/source/_integrations/nfandroidtv.markdown index 9cdc365c46a..fd1f994c6ed 100644 --- a/source/_integrations/nfandroidtv.markdown +++ b/source/_integrations/nfandroidtv.markdown @@ -72,58 +72,43 @@ interrupt: 1 ## Service data for sending images and icons -The following attributes can be placed inside `data` to send images and icons. - | Service data attribute | Optional | Description | | ---------------------- | -------- | ----------- | -| `image` | yes | Groups the attributes for image upload. If present, either `url` or `path` have to be provided. -| `icon` | yes | Groups the attributes for icon upload. If present, either `url` or `path` have to be provided. -| `path` | yes | Local path of an image file. Is placed inside `image`, `icon` or both. +| `image` | yes | Groups the attributes for image upload. It can take a `url` or `path`. It is optional unless you use authentication options. Then, either `url` or `path` has to be provided. | +| `icon` | yes | Groups the attributes for icon upload. It can take a `url` or `path`. It is optional unless you use authentication options. Then, either `url` or `path` has to be provided. | +| `path` | yes | Local path of an image file. Is placed inside `image`, `icon`, or both. | `url` | yes | URL of an image file. Is placed inside `image`, `icon` or both. | `username` | yes | Username if the URL requires authentication. Is placed inside `image`, `icon` or both`. | `password` | yes | Password if the URL requires authentication. Is placed inside `image`, `icon` or both. | `auth` | yes | If set to `digest` HTTP-Digest-Authentication is used. If missing, HTTP-BASIC-Authentication is used and is placed inside `image`, `icon` or both. -Example for posting image from URL: +Example Service data for both image and icons: ```yaml +# If your urls do not require extra authentication +icon: "http://[url to image file]" +image: "http://[url to image file]" + +# Paths in most cases +icon: "/you/path/location" +image: "/you/path/location" +# Or alternatively +icon: + path: "/you/path/location" +image: + path: "/you/path/location" + +# If your urls require extra authentication image: url: "http://[url to image file]" - username: "optional user, if necessary" - password: "optional password, if necessary" - auth: "digest" -``` - -Example for posting image from local path: - -```yaml -image: - path: "/path/to/file.ext" -``` - -Example for posting icon from URL: - -```yaml + username: "optional user, if necessary" # Optional + password: "optional password, if necessary" # Optional + auth: "digest" # Optional icon: url: "http://[url to image file]" - username: "optional user, if necessary" - password: "optional password, if necessary" - auth: "digest" -``` - -Example for posting both image and icon from URL: - -```yaml -image: - url: "http://[url to image file]" - username: "optional user, if necessary" - password: "optional password, if necessary" - auth: "digest" -icon: - url: "http://[url to image file]" - username: "optional user, if necessary" - password: "optional password, if necessary" - auth: "digest" + username: "optional user, if necessary" # Optional + password: "optional password, if necessary" # Optional + auth: "digest" # Optional ``` Example of an automation with an service call, full configuration: