Name = "Joker"
Description = ''''''
URL = "https://joker.com"
Code = "joker"
Since = "v2.6.0"

Example = '''
# SVC
JOKER_API_MODE=SVC \
JOKER_USERNAME=<your email> \
JOKER_PASSWORD=<your password> \
lego --email you@example.com --dns joker -d '*.example.com' -d example.com run

# DMAPI
JOKER_API_MODE=DMAPI \
JOKER_USERNAME=<your email> \
JOKER_PASSWORD=<your password> \
lego --email you@example.com --dns joker -d '*.example.com' -d example.com run
## or
JOKER_API_MODE=DMAPI \
JOKER_API_KEY=<your API key> \
lego --email you@example.com --dns joker -d '*.example.com' -d example.com run
'''

Additional = '''
## SVC mode

In the SVC mode, username and passsword are not your email and account passwords, but those displayed in Joker.com domain dashboard when enabling Dynamic DNS.

As per [Joker.com documentation](https://joker.com/faq/content/6/496/en/let_s-encrypt-support.html):

> 1. please log in at Joker.com, visit 'My Domains',
>    find the domain you want to add  Let's Encrypt certificate for, and chose "DNS" in the menu
>
> 2. on the top right, you will find the setting for 'Dynamic DNS'.
>    If not already active, please activate it.
>    It will not affect any other already existing DNS records of this domain.
>
> 3. please take a note of the credentials which are now shown as 'Dynamic DNS Authentication', consisting of a 'username' and a 'password'.
>
> 4. this is all you have to do here - and only once per domain.
'''

[Configuration]
  [Configuration.Credentials]
    JOKER_API_MODE = "'DMAPI' or 'SVC'. DMAPI is for resellers accounts. (Default: DMAPI)"
    JOKER_USERNAME = "Joker.com username"
    JOKER_PASSWORD = "Joker.com password"
    JOKER_API_KEY = "API key (only with DMAPI mode)"
  [Configuration.Additional]
    JOKER_POLLING_INTERVAL = "Time between DNS propagation check in seconds (Default: 2)"
    JOKER_PROPAGATION_TIMEOUT = "Maximum waiting time for DNS propagation in seconds (Default: 120)"
    JOKER_TTL = "The TTL of the TXT record used for the DNS challenge in seconds (Default: 120)"
    JOKER_HTTP_TIMEOUT = "API request timeout in seconds (Default: 60)"
    JOKER_SEQUENCE_INTERVAL = "Time between sequential requests in seconds (Default: 60), only with 'SVC' mode"

[Links]
  API = "https://joker.com/faq/category/39/22-dmapi.html"
  API_SVC = "https://joker.com/faq/content/6/496/en/let_s-encrypt-support.html"
