diff options
| author | Christian Cleberg <[email protected]> | 2024-05-01 21:45:52 -0500 |
|---|---|---|
| committer | Christian Cleberg <[email protected]> | 2024-05-01 21:45:52 -0500 |
| commit | 7d3b5175f2d9d016b06190273fcfeb380a460b3f (patch) | |
| tree | 71139c9021b09704b2d45be3b64d54e2acbae55f /content/blog/2022-02-10-njalla-dns-api.md | |
| parent | 7c70a351e25106ceff49ff8ee0a38e2a545f62f0 (diff) | |
| download | cleberg.net-7d3b5175f2d9d016b06190273fcfeb380a460b3f.tar.gz cleberg.net-7d3b5175f2d9d016b06190273fcfeb380a460b3f.tar.bz2 cleberg.net-7d3b5175f2d9d016b06190273fcfeb380a460b3f.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 |
