Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix missing parameter in example code #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ Using RFC2136 with TSIG:
let client = Rfc2136Provider::new_tsig("tcp://127.0.0.1:53", "<KEY_NAME>", STANDARD.decode("<TSIG_KEY>").unwrap(), TsigAlgorithm::HmacSha512).unwrap();

// Create a new TXT record
c.create(
client.create(
"test._domainkey.example.org",
DnsRecord::TXT {
content: "v=DKIM1; k=rsa; h=sha256; p=test".to_string(),
Expand All @@ -39,19 +39,19 @@ Using RFC2136 with TSIG:
.unwrap();

// Delete the record
c.delete("test._domainkey.example.org", "example.org").await.unwrap();
client.delete("test._domainkey.example.org", "example.org").await.unwrap();
```

Using Cloudflare's API:

```rust
// Create a new Cloudflare client
let client =
DnsUpdater::new_cloudflare("<API_TOKEN>", None::<String>)
DnsUpdater::new_cloudflare("<API_TOKEN>", None::<String>, Some(Duration::from_secs(60)))
.unwrap();

// Create a new TXT record
c.create(
client.create(
"test._domainkey.example.org",
DnsRecord::TXT {
content: "v=DKIM1; k=rsa; h=sha256; p=test".to_string(),
Expand All @@ -63,7 +63,7 @@ Using Cloudflare's API:
.unwrap();

// Delete the record
c.delete("test._domainkey.example.org", "example.org").await.unwrap();
client.delete("test._domainkey.example.org", "example.org").await.unwrap();
```

## License
Expand Down