#api-client #api-bindings #godaddy #domain-name

godaddy_api

Rust API 绑定 - sgodaddy_api

4 个稳定版本

2.0.2 2024 年 1 月 18 日
2.0.1 2024 年 1 月 15 日
1.0.0 2024 年 1 月 15 日

#1 in #godaddy

每月 39 次下载

MIT 许可证

440KB
10K SLoC

godaddy_api rust

身份验证

use godaddy_api::Client;

let client = Client::default().with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));

取消

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .cancel(CancelRequest {
        domain: "string".to_string(),
    });

取消隐私

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .cancel_privacy(CancelPrivacyRequest {
        domain: "string".to_string(),
    });

record_delete_type_name

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .record_delete_type_name(RecordDeleteTypeNameRequest {
        domain: "string".to_string(),
        type_path: DeleteV1DomainsDomainRecordsTypeNameTypeEnum::A,
        name: "string".to_string(),
    });

domains_forwards_delete

注释

  • shopperIdcustomerId 不同。 shopperId 是一个最大长度为 10 位的数字(例如:1234567890),而 customerId 是一个 UUIDv4(例如:295e3bc3-b3b9-4d95-aae5-ede41a994d13)。

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .domains_forwards_delete(DomainsForwardsDeleteRequest {
        customer_id: "string".to_string(),
        fqdn: "string".to_string(),
    });

delete_v2_customers_customer_id_domains_domain_actions_type

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .delete_v2_customers_customer_id_domains_domain_actions_type(DeleteV2CustomersCustomerIdDomainsDomainActionsTypeRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        type_path: DeleteV2CustomersCustomerIdDomainsDomainActionsTypeTypeEnum::AuthCodePurchase,
    });

delete_v2_customers_customer_id_domains_domain_change_of_registrant

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .delete_v2_customers_customer_id_domains_domain_change_of_registrant(DeleteV2CustomersCustomerIdDomainsDomainChangeOfRegistrantRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

列表

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .list(ListRequest {
        ..Default::default()
    });

get_agreement

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_agreement(GetAgreementRequest {
        privacy: true,
        tlds: vec!["string".to_string()],
        ..Default::default()
    });

可用性

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .available(AvailableRequest {
        domain: "string".to_string(),
        ..Default::default()
    });

模式

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .schema(SchemaRequest {
        tld: "string".to_string(),
    });

建议

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .suggest(SuggestRequest {
        ..Default::default()
    });

顶级域名

use godaddy_api::Client;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client.tlds();

获取

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get(GetRequest {
        domain: "string".to_string(),
    });

record_get

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .record_get(RecordGetRequest {
        domain: "string".to_string(),
        type_path: GetV1DomainsDomainRecordsTypeNameTypeEnum::A,
        name: "string".to_string(),
        ..Default::default()
    });

domains_forwards_get

注释

  • shopperIdcustomerId 不同。 shopperId 是一个最大长度为 10 位的数字(例如:1234567890),而 customerId 是一个 UUIDv4(例如:295e3bc3-b3b9-4d95-aae5-ede41a994d13)。

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .domains_forwards_get(DomainsForwardsGetRequest {
        customer_id: "string".to_string(),
        fqdn: "string".to_string(),
        ..Default::default()
    });

get_v2_customers_customer_id_domains_notifications

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_notifications(GetV2CustomersCustomerIdDomainsNotificationsRequest {
        customer_id: "string".to_string(),
    });

get_v2_customers_customer_id_domains_notifications_opt_in

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_notifications_opt_in(GetV2CustomersCustomerIdDomainsNotificationsOptInRequest {
        customer_id: "string".to_string(),
    });

get_v2_customers_customer_id_domains_notifications_schemas_type

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_notifications_schemas_type(GetV2CustomersCustomerIdDomainsNotificationsSchemasTypeRequest {
        customer_id: "string".to_string(),
        type_path: GetV2CustomersCustomerIdDomainsNotificationsSchemasTypeTypeEnum::AutoRenewal,
    });

get_v2_customers_customer_id_domains_register_schema_tld

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_register_schema_tld(GetV2CustomersCustomerIdDomainsRegisterSchemaTldRequest {
        customer_id: "string".to_string(),
        tld: "string".to_string(),
    });

get_v2_customers_customer_id_domains_domain

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_domain(GetV2CustomersCustomerIdDomainsDomainRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        ..Default::default()
    });

get_v2_customers_customer_id_domains_domain_actions

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_domain_actions(GetV2CustomersCustomerIdDomainsDomainActionsRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

get_v2_customers_customer_id_domains_domain_actions_type

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_domain_actions_type(GetV2CustomersCustomerIdDomainsDomainActionsTypeRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        type_path: GetV2CustomersCustomerIdDomainsDomainActionsTypeTypeEnum::AuthCodePurchase,
    });

get_v2_customers_customer_id_domains_domain_change_of_registrant

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_domain_change_of_registrant(GetV2CustomersCustomerIdDomainsDomainChangeOfRegistrantRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

get_v2_customers_customer_id_domains_domain_privacy_forwarding

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_customers_customer_id_domains_domain_privacy_forwarding(GetV2CustomersCustomerIdDomainsDomainPrivacyForwardingRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

get_v2_domains_maintenances

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_domains_maintenances(GetV2DomainsMaintenancesRequest {
        ..Default::default()
    });

get_v2_domains_maintenances_maintenance_id

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .get_v2_domains_maintenances_maintenance_id(GetV2DomainsMaintenancesMaintenanceIdRequest {
        maintenance_id: "string".to_string(),
    });

更新

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .update(UpdateRequest {
        domain: "string".to_string(),
        data: DomainUpdate {
            ..Default::default()
        },
    });

update_contacts

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .update_contacts(UpdateContactsRequest {
        domain: "string".to_string(),
        data: DomainContacts {
            contact_registrant: Contact {
                address_mailing: Address {
                    address1: "string".to_string(),
                    city: "string".to_string(),
                    country: AddressCountryEnum::Ac,
                    postal_code: "string".to_string(),
                    state: "string".to_string(),
                    ..Default::default()
                },
                email: "[email protected]".to_string(),
                name_first: "string".to_string(),
                name_last: "string".to_string(),
                phone: "string".to_string(),
                ..Default::default()
            },
            ..Default::default()
        },
    });

record_add

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .record_add(RecordAddRequest {
        domain: "string".to_string(),
        data: vec![
            DnsRecord { data : "string".to_string(), name : "string".to_string(),
            type_field : DnsRecordTypeEnum::A, ..Default::default() }
        ],
    });

patch_v2_customers_customer_id_domains_domain_privacy_forwarding

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .patch_v2_customers_customer_id_domains_domain_privacy_forwarding(PatchV2CustomersCustomerIdDomainsDomainPrivacyForwardingRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainPrivacyForwardingUpdate {
            email_preference: DomainPrivacyForwardingUpdateEmailPreferenceEnum::EmailFilter,
            private_email_type: DomainPrivacyForwardingUpdatePrivateEmailTypeEnum::Default,
            ..Default::default()
        },
    });

available_bulk

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .available_bulk(AvailableBulkRequest {
        data: vec!["string".to_string()],
        ..Default::default()
    });

contacts_validate

请求中指定的所有联系人将根据 "domains" 中指定的所有域名进行验证。作为替代方案,您还可以传入 tlds,除了 uk,它需要完整的域名名称。

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .contacts_validate(ContactsValidateRequest {
        data: DomainsContactsBulk {
            domains: vec!["string".to_string()],
            ..Default::default()
        },
        ..Default::default()
    });

购买

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .purchase(PurchaseRequest {
        data: DomainPurchase {
            consent: Consent {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
            },
            domain: "string".to_string(),
            ..Default::default()
        },
    });

验证

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .validate(ValidateRequest {
        data: DomainPurchase {
            consent: Consent {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
            },
            domain: "string".to_string(),
            ..Default::default()
        },
    });

购买隐私

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .purchase_privacy(PurchasePrivacyRequest {
        domain: "string".to_string(),
        data: PrivacyPurchase {
            consent: Consent {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
            },
        },
    });

续费

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .renew(RenewRequest {
        domain: "string".to_string(),
        data: DomainRenew {
            ..Default::default()
        },
    });

转入

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .transfer_in(TransferInRequest {
        domain: "string".to_string(),
        data: DomainTransferIn {
            auth_code: "string".to_string(),
            consent: Consent {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
            },
            ..Default::default()
        },
    });

验证电子邮件

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .verify_email(VerifyEmailRequest {
        domain: "string".to_string(),
    });

domains_forwards_post

注释

  • shopperIdcustomerId 不同。 shopperId 是一个最大长度为 10 位的数字(例如:1234567890),而 customerId 是一个 UUIDv4(例如:295e3bc3-b3b9-4d95-aae5-ede41a994d13)。

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .domains_forwards_post(DomainsForwardsPostRequest {
        customer_id: "string".to_string(),
        fqdn: "string".to_string(),
        data: DomainForwardingCreate {
            type_field: DomainForwardingCreateTypeEnum::Masked,
            url: "http://www.example.com".to_string(),
            ..Default::default()
        },
    });

post_v2_customers_customer_id_domains_notifications_notification_id_acknowledge

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_notifications_notification_id_acknowledge(PostV2CustomersCustomerIdDomainsNotificationsNotificationIdAcknowledgeRequest {
        customer_id: "string".to_string(),
        notification_id: "string".to_string(),
    });

post_v2_customers_customer_id_domains_register

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_register(PostV2CustomersCustomerIdDomainsRegisterRequest {
        customer_id: "string".to_string(),
        data: DomainPurchaseV2 {
            consent: ConsentV2 {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
                currency: "string".to_string(),
                price: 123,
                ..Default::default()
            },
            domain: "string".to_string(),
            ..Default::default()
        },
    });

post_v2_customers_customer_id_domains_register_validate

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_register_validate(PostV2CustomersCustomerIdDomainsRegisterValidateRequest {
        customer_id: "string".to_string(),
        data: DomainPurchaseV2 {
            consent: ConsentV2 {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
                currency: "string".to_string(),
                price: 123,
                ..Default::default()
            },
            domain: "string".to_string(),
            ..Default::default()
        },
    });

post_v2_customers_customer_id_domains_domain_redeem

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_redeem(PostV2CustomersCustomerIdDomainsDomainRedeemRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainRedeemV2 {
            consent: ConsentRedemption {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                currency: "string".to_string(),
                fee: 123,
                price: 123,
            },
        },
    });

post_v2_customers_customer_id_domains_domain_renew

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_renew(PostV2CustomersCustomerIdDomainsDomainRenewRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainRenewV2 {
            consent: ConsentRenew {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                currency: "string".to_string(),
                price: 123,
                ..Default::default()
            },
            expires: "string".to_string(),
            ..Default::default()
        },
    });

post_v2_customers_customer_id_domains_domain_transfer

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer(PostV2CustomersCustomerIdDomainsDomainTransferRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainTransferInV2 {
            auth_code: "string".to_string(),
            consent: ConsentV2 {
                agreed_at: "string".to_string(),
                agreed_by: "string".to_string(),
                agreement_keys: vec!["string".to_string()],
                currency: "string".to_string(),
                price: 123,
                ..Default::default()
            },
            ..Default::default()
        },
    });

post_v2_customers_customer_id_domains_domain_transfer_in_accept

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_in_accept(PostV2CustomersCustomerIdDomainsDomainTransferInAcceptRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainTransferAuthCode {
            auth_code: "string".to_string(),
        },
    });

post_v2_customers_customer_id_domains_domain_transfer_in_cancel

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_in_cancel(PostV2CustomersCustomerIdDomainsDomainTransferInCancelRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

post_v2_customers_customer_id_domains_domain_transfer_in_restart

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_in_restart(PostV2CustomersCustomerIdDomainsDomainTransferInRestartRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

post_v2_customers_customer_id_domains_domain_transfer_in_retry

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_in_retry(PostV2CustomersCustomerIdDomainsDomainTransferInRetryRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainTransferAuthCode {
            auth_code: "string".to_string(),
        },
    });

post_v2_customers_customer_id_domains_domain_transfer_out

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_out(PostV2CustomersCustomerIdDomainsDomainTransferOutRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        registrar: "string".to_string(),
    });

post_v2_customers_customer_id_domains_domain_transfer_out_accept

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_out_accept(PostV2CustomersCustomerIdDomainsDomainTransferOutAcceptRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
    });

post_v2_customers_customer_id_domains_domain_transfer_out_reject

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .post_v2_customers_customer_id_domains_domain_transfer_out_reject(PostV2CustomersCustomerIdDomainsDomainTransferOutRejectRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        ..Default::default()
    });

record_replace

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .record_replace(RecordReplaceRequest {
        domain: "string".to_string(),
        data: vec![
            DnsRecord { data : "string".to_string(), name : "string".to_string(),
            type_field : DnsRecordTypeEnum::A, ..Default::default() }
        ],
    });

record_replace_type

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .record_replace_type(RecordReplaceTypeRequest {
        domain: "string".to_string(),
        type_path: PutV1DomainsDomainRecordsTypeTypeEnum::A,
        data: vec![
            DnsRecordCreateType { data : "string".to_string(), name : "string"
            .to_string(), ..Default::default() }
        ],
    });

record_replace_type_name

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .record_replace_type_name(RecordReplaceTypeNameRequest {
        domain: "string".to_string(),
        type_path: PutV1DomainsDomainRecordsTypeNameTypeEnum::A,
        name: "string".to_string(),
        data: vec![
            DnsRecordCreateTypeName { data : "string".to_string(),
            ..Default::default() }
        ],
    });

domains_forwards_put

注释

  • shopperIdcustomerId 不同。 shopperId 是一个最大长度为 10 位的数字(例如:1234567890),而 customerId 是一个 UUIDv4(例如:295e3bc3-b3b9-4d95-aae5-ede41a994d13)。

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .domains_forwards_put(DomainsForwardsPutRequest {
        customer_id: "string".to_string(),
        fqdn: "string".to_string(),
        data: DomainForwardingCreate {
            type_field: DomainForwardingCreateTypeEnum::Masked,
            url: "http://www.example.com".to_string(),
            ..Default::default()
        },
    });

put_v2_customers_customer_id_domains_notifications_opt_in

use godaddy_api::Client;
use godaddy_api::request_types::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .put_v2_customers_customer_id_domains_notifications_opt_in(PutV2CustomersCustomerIdDomainsNotificationsOptInRequest {
        customer_id: "string".to_string(),
        types: vec![
            PutV2CustomersCustomerIdDomainsNotificationsOptInTypesItemEnum::AuthCodePurchase
        ],
    });

put_v2_customers_customer_id_domains_domain_name_servers

use godaddy_api::Client;
use godaddy_api::request_types::*;
use godaddy_api::schemas::*;
let client = Client::default()
    .with_api_key_auth(&std::env::var("API_KEY").expect("API key not defined"));
let response = client
    .put_v2_customers_customer_id_domains_domain_name_servers(PutV2CustomersCustomerIdDomainsDomainNameServersRequest {
        customer_id: "string".to_string(),
        domain: "string".to_string(),
        data: DomainNameServerUpdateV2 {
            ..Default::default()
        },
    });

依赖关系

~4–16MB
~235K SLoC