Add FreeDNS API V2 documentation (#15514)

This commit is contained in:
Guy Khmelnitsky 2021-01-25 15:57:01 +02:00 committed by GitHub
parent 24d84ac6f8
commit 75787aa286
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,18 +10,18 @@ ha_domain: freedns
With the `freedns` integration you can keep your [FreeDNS](https://freedns.afraid.org) record up to date. With the `freedns` integration you can keep your [FreeDNS](https://freedns.afraid.org) record up to date.
## Setup ## Setup (Default API V1)
You need to determine your update URL or your access token. You need to determine your update URL or your access token.
1. Head over to the [FreeDNS](https://freedns.afraid.org) website and login to your account. 1. Head over to the [FreeDNS](https://freedns.afraid.org) website and login to your account.
2. Select the menu "Dynamic DNS" 2. Select the menu "Dynamic DNS"
3. You should now see your update candiates in a table at the bottom of the page. 3. You should now see your update candidates in a table at the bottom of the page.
4. Copy the link target of the "Direct URL". 4. Copy the link target of the "Direct URL".
5. The access token is the part at the end of the link: `https://freedns.afraid.org/dynamic/update.php?YOUR_UPDATE_TOKEN` 5. The access token is the part at the end of the link: `https://freedns.afraid.org/dynamic/update.php?YOUR_UPDATE_TOKEN`
6. Either put the token as `access_token` _or_ the whole URL into the `url` attribute. 6. Either put the token as `access_token` _or_ the whole URL into the `url` attribute.
## Configuration ## Configuration (API V1)
To use the integration in your installation, add the following to your `configuration.yaml` file: To use the integration in your installation, add the following to your `configuration.yaml` file:
@ -31,6 +31,29 @@ freedns:
access_token: YOUR_TOKEN access_token: YOUR_TOKEN
``` ```
## Setup (API V2)
You need to determine your update URL or your access token.
1. Head over to the [FreeDNS](https://freedns.afraid.org) website and login to your account.
2. Select the menu "Dynamic DNS"
3. You should now see your update candidates in a table at the bottom of the page.
4. Head over to page [Version 2](https://freedns.afraid.org/dynamic/v2/), and enable the candidate.
5. The access token is the part at the end of the link: `http://sync.afraid.org/u/RANDOMIZED_TOKEN/`
6. Put the whole URL into the `url` attribute.
7. (Instead of using the randomized token URL in the Version 2 there are other options to use for URL)
## Configuration (API V2)
To use the integration in your installation, add the following to your `configuration.yaml` file:
```yaml
# Example configuration.yaml entry
freedns:
url: http://sync.afraid.org/u/RANDOMIZED_TOKEN/
```
{% configuration %} {% configuration %}
access_token: access_token:
description: Your access token. This is exclusive to `url`. description: Your access token. This is exclusive to `url`.