diff options
author | Christian Cleberg <hello@cleberg.net> | 2024-05-01 21:45:52 -0500 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2024-05-01 21:45:52 -0500 |
commit | dc1261d703ae1e1a14841b030888e3f87ff7c38f (patch) | |
tree | 71139c9021b09704b2d45be3b64d54e2acbae55f /content/blog/2022-02-10-njalla-dns-api.md | |
parent | ba6b552c8256cc2e071c910ef7821c82443f1f82 (diff) | |
download | cleberg.net-dc1261d703ae1e1a14841b030888e3f87ff7c38f.tar.gz cleberg.net-dc1261d703ae1e1a14841b030888e3f87ff7c38f.tar.bz2 cleberg.net-dc1261d703ae1e1a14841b030888e3f87ff7c38f.zip |
prettier formatting and rewrap lines
Diffstat (limited to 'content/blog/2022-02-10-njalla-dns-api.md')
-rw-r--r-- | content/blog/2022-02-10-njalla-dns-api.md | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/content/blog/2022-02-10-njalla-dns-api.md b/content/blog/2022-02-10-njalla-dns-api.md index 52b65fc..7f5f9d3 100644 --- a/content/blog/2022-02-10-njalla-dns-api.md +++ b/content/blog/2022-02-10-njalla-dns-api.md @@ -46,7 +46,7 @@ For this demo, we are using the `list-records` and `edit-record` requests. The `list-records` request requires the following payload to be sent when calling the API: -``` txt +```txt params: { domain: string } @@ -55,7 +55,7 @@ params: { The `edit-record` request requires the following payload to be sent when calling the API: -``` txt +```txt params: { domain: string id: int @@ -84,19 +84,21 @@ Next, create a Python script file: nano ~/ddns/ddns.py ``` -The following code snippet is quite long, so I won't go into depth on each -part. However, I suggest you read through the entire script before running it; -it is quite simple and contains comments to help explain each code block. +The following code snippet is quite long, so I won't go into depth on each part. +However, I suggest you read through the entire script before running it; it is +quite simple and contains comments to help explain each code block. :warning: **Note**: You will need to update the following variables for this to work: -- `token`: This is the Njalla API token you created earlier. -- `user_domain`: This is the top-level domain you want to modify. -- `include_subdomains`: Set this to `True` if you also want to modify subdomains found under the TLD. -- `subdomains`: If `include_subdomains` = `True`, you can include your list of subdomains to be modified here. +- `token`: This is the Njalla API token you created earlier. +- `user_domain`: This is the top-level domain you want to modify. +- `include_subdomains`: Set this to `True` if you also want to modify + subdomains found under the TLD. +- `subdomains`: If `include_subdomains` = `True`, you can include your list of + subdomains to be modified here. -``` python +```python #!/usr/bin/python # -*- coding: utf-8 -*- # Import Python modules |