dnsimple

Crates.iodnsimple
lib.rsdnsimple
version5.0.0
created_at2015-12-28 14:41:12.415165+00
updated_at2026-01-23 12:58:08.351888+00
descriptionThe DNSimple API client for Rust.
homepage
repositoryhttps://github.com/dnsimple/dnsimple-rust
max_upload_size
id3781
size181,803
(dnsimple-release)

documentation

README

DNSimple Rust Client

A Rust client for the DNSimple API v2.

Build Status

Requirements

  • Rust: 1.86+
  • An activated DNSimple account

Installation

Add this to your Cargo.toml:

[dependencies]
dnsimple = "0.1"

Usage

use dnsimple::dnsimple::{Client, new_client};

let client = new_client(false, String::from("AUTH_TOKEN"));
let identity_response = client.identity().whoami().unwrap().data.unwrap();

Configuration

Sandbox Environment

We highly recommend testing against our sandbox environment before using our production environment. This will allow you to avoid real purchases, live charges on your credit card, and reduce the chance of your running up against rate limits.

The client supports both the production and sandbox environment. To switch to sandbox pass the sandbox API host setting the sandbox option to true when you construct the client:

use dnsimple::dnsimple::{Client, new_client};

let client = new_client(true, String::from("AUTH_TOKEN"));
let identity_response = client.identity().whoami().unwrap().data.unwrap();

You will need to ensure that you are using an access token created in the sandbox environment. Production tokens will not work in the sandbox environment.

Setting a custom User-Agent header

You can customize the User-Agent header for the calls made to the DNSimple API:

use dnsimple::dnsimple::{Client, new_client};

let mut client = new_client(false, String::from("AUTH_TOKEN"));
client.set_user_agent("my-app/1.0");

The value you provide will be prepended to the default User-Agent the client uses. For example, if you use my-app/1.0, the final header value will be my-app/1.0 dnsimple-rust/0.1.0 (note that it will vary depending on the client version).

Documentation

Contributing

Contributions are welcome! Please feel free to submit issues and pull requests. See CONTRIBUTING.md for guidelines.

Changelog

See CHANGELOG.md for details.

License

Copyright (c) 2021-2026 DNSimple Corporation. This is Free Software distributed under the MIT License.

Commit count: 162

cargo fmt