dnsimple 11.1.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +10 -5
- data/.github/workflows/release.yml +44 -13
- data/.github/workflows/sync-test-fixtures.yml +1 -1
- data/.rubocop.yml +4 -1
- data/.rubocop_dnsimple.yml +13 -41
- data/.rubocop_todo.yml +4 -9
- data/CHANGELOG.md +285 -183
- data/CONTRIBUTING.md +6 -40
- data/Gemfile +1 -1
- data/LICENSE.txt +1 -1
- data/README.md +49 -40
- data/RELEASING.md +67 -0
- data/dnsimple.gemspec +1 -1
- data/lib/dnsimple/client/accounts.rb +1 -3
- data/lib/dnsimple/client/billing.rb +2 -4
- data/lib/dnsimple/client/certificates.rb +0 -2
- data/lib/dnsimple/client/clients.rb +2 -40
- data/lib/dnsimple/client/contacts.rb +17 -19
- data/lib/dnsimple/client/dns_analytics.rb +2 -4
- data/lib/dnsimple/client/domains.rb +13 -15
- data/lib/dnsimple/client/domains_delegation_signer_records.rb +18 -20
- data/lib/dnsimple/client/domains_dnssec.rb +9 -11
- data/lib/dnsimple/client/domains_email_forwards.rb +18 -20
- data/lib/dnsimple/client/domains_pushes.rb +13 -15
- data/lib/dnsimple/client/identity.rb +4 -9
- data/lib/dnsimple/client/oauth.rb +1 -3
- data/lib/dnsimple/client/registrar.rb +45 -47
- data/lib/dnsimple/client/registrar_auto_renewal.rb +6 -8
- data/lib/dnsimple/client/registrar_delegation.rb +14 -16
- data/lib/dnsimple/client/registrar_registrant_changes.rb +14 -16
- data/lib/dnsimple/client/registrar_transfer_lock.rb +9 -11
- data/lib/dnsimple/client/registrar_whois_privacy.rb +6 -48
- data/lib/dnsimple/client/services.rb +4 -6
- data/lib/dnsimple/client/services_domains.rb +12 -14
- data/lib/dnsimple/client/templates.rb +17 -19
- data/lib/dnsimple/client/templates_domains.rb +4 -6
- data/lib/dnsimple/client/templates_records.rb +18 -20
- data/lib/dnsimple/client/tlds.rb +6 -8
- data/lib/dnsimple/client/vanity_name_servers.rb +0 -2
- data/lib/dnsimple/client/webhooks.rb +11 -13
- data/lib/dnsimple/client/zones.rb +16 -18
- data/lib/dnsimple/client/zones_distributions.rb +4 -6
- data/lib/dnsimple/client/zones_records.rb +29 -31
- data/lib/dnsimple/client.rb +22 -24
- data/lib/dnsimple/default.rb +0 -4
- data/lib/dnsimple/error.rb +0 -6
- data/lib/dnsimple/extra.rb +4 -6
- data/lib/dnsimple/options.rb +1 -7
- data/lib/dnsimple/response.rb +4 -13
- data/lib/dnsimple/struct/account.rb +0 -2
- data/lib/dnsimple/struct/certificate.rb +0 -2
- data/lib/dnsimple/struct/certificate_bundle.rb +0 -2
- data/lib/dnsimple/struct/certificate_purchase.rb +0 -2
- data/lib/dnsimple/struct/certificate_renewal.rb +0 -2
- data/lib/dnsimple/struct/charge.rb +4 -8
- data/lib/dnsimple/struct/collaborator.rb +0 -2
- data/lib/dnsimple/struct/contact.rb +0 -2
- data/lib/dnsimple/struct/delegation_signer_record.rb +0 -2
- data/lib/dnsimple/struct/dns_analytics.rb +0 -2
- data/lib/dnsimple/struct/dnssec.rb +0 -2
- data/lib/dnsimple/struct/domain.rb +0 -2
- data/lib/dnsimple/struct/domain_check.rb +0 -2
- data/lib/dnsimple/struct/domain_premium_price.rb +0 -2
- data/lib/dnsimple/struct/domain_price.rb +0 -2
- data/lib/dnsimple/struct/domain_push.rb +0 -2
- data/lib/dnsimple/struct/domain_registration.rb +0 -2
- data/lib/dnsimple/struct/domain_renewal.rb +0 -2
- data/lib/dnsimple/struct/domain_restore.rb +0 -2
- data/lib/dnsimple/struct/domain_transfer.rb +0 -2
- data/lib/dnsimple/struct/email_forward.rb +0 -2
- data/lib/dnsimple/struct/extended_attribute.rb +0 -4
- data/lib/dnsimple/struct/oauth_token.rb +0 -2
- data/lib/dnsimple/struct/registrant_change.rb +0 -2
- data/lib/dnsimple/struct/registrant_change_check.rb +0 -2
- data/lib/dnsimple/struct/service.rb +0 -4
- data/lib/dnsimple/struct/template.rb +0 -2
- data/lib/dnsimple/struct/template_record.rb +0 -2
- data/lib/dnsimple/struct/tld.rb +0 -2
- data/lib/dnsimple/struct/transfer_lock.rb +0 -2
- data/lib/dnsimple/struct/user.rb +0 -2
- data/lib/dnsimple/struct/vanity_name_server.rb +0 -2
- data/lib/dnsimple/struct/webhook.rb +0 -2
- data/lib/dnsimple/struct/whoami.rb +2 -4
- data/lib/dnsimple/struct/whois_privacy.rb +0 -2
- data/lib/dnsimple/struct/zone.rb +0 -2
- data/lib/dnsimple/struct/zone_distribution.rb +0 -2
- data/lib/dnsimple/struct/zone_file.rb +0 -2
- data/lib/dnsimple/struct/zone_record.rb +0 -2
- data/lib/dnsimple/struct/zone_record_id.rb +0 -2
- data/lib/dnsimple/struct/zone_records_batch_change.rb +0 -2
- data/lib/dnsimple/struct.rb +0 -3
- data/lib/dnsimple/version.rb +1 -3
- data/lib/dnsimple.rb +1 -3
- data/spec/dnsimple/client/client_service_spec.rb +12 -10
- data/spec/dnsimple/client/oauth_spec.rb +6 -6
- data/spec/dnsimple/client/registrar_whois_privacy_spec.rb +0 -82
- data/spec/fixtures.http/acceptPush/success.http +15 -15
- data/spec/fixtures.http/accounts/success-account.http +20 -20
- data/spec/fixtures.http/accounts/success-user.http +21 -21
- data/spec/fixtures.http/activateZoneService/success.http +16 -16
- data/spec/fixtures.http/appliedServices/success.http +19 -19
- data/spec/fixtures.http/applyService/success.http +15 -15
- data/spec/fixtures.http/applyTemplate/success.http +13 -13
- data/spec/fixtures.http/authorizeDomainTransferOut/success.http +13 -13
- data/spec/fixtures.http/badgateway.http +5 -5
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_create_validation_failed.http +16 -16
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_delete_validation_failed.http +3 -3
- data/spec/fixtures.http/batchChangeZoneRecords/error_400_update_validation_failed.http +3 -3
- data/spec/fixtures.http/batchChangeZoneRecords/success.http +16 -16
- data/spec/fixtures.http/cancelDomainTransfer/success.http +17 -17
- data/spec/fixtures.http/changeDomainDelegation/success.http +15 -15
- data/spec/fixtures.http/changeDomainDelegationFromVanity/success.http +15 -15
- data/spec/fixtures.http/changeDomainDelegationToVanity/success.http +17 -17
- data/spec/fixtures.http/checkDomain/success.http +15 -15
- data/spec/fixtures.http/checkRegistrantChange/error-contactnotfound.http +3 -3
- data/spec/fixtures.http/checkRegistrantChange/error-domainnotfound.http +3 -3
- data/spec/fixtures.http/checkRegistrantChange/success.http +15 -15
- data/spec/fixtures.http/checkZoneDistribution/error.http +17 -17
- data/spec/fixtures.http/checkZoneDistribution/failure.http +17 -17
- data/spec/fixtures.http/checkZoneDistribution/success.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/error.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/failure.http +17 -17
- data/spec/fixtures.http/checkZoneRecordDistribution/success.http +17 -17
- data/spec/fixtures.http/createContact/created.http +16 -16
- data/spec/fixtures.http/createContact/error-validation-errors.http +15 -15
- data/spec/fixtures.http/createDelegationSignerRecord/created.http +17 -17
- data/spec/fixtures.http/createDelegationSignerRecord/validation-error.http +15 -15
- data/spec/fixtures.http/createDomain/created.http +19 -19
- data/spec/fixtures.http/createEmailForward/created.http +21 -21
- data/spec/fixtures.http/createPrimaryServer/created.http +20 -20
- data/spec/fixtures.http/createRegistrantChange/success.http +14 -14
- data/spec/fixtures.http/createSecondaryZone/created.http +20 -20
- data/spec/fixtures.http/createTemplate/created.http +15 -15
- data/spec/fixtures.http/createTemplateRecord/created.http +16 -16
- data/spec/fixtures.http/createWebhook/created.http +13 -13
- data/spec/fixtures.http/createZoneRecord/created-apex.http +13 -13
- data/spec/fixtures.http/createZoneRecord/created.http +13 -13
- data/spec/fixtures.http/deactivateZoneService/success.http +16 -16
- data/spec/fixtures.http/deleteContact/error-contact-in-use.http +15 -15
- data/spec/fixtures.http/deleteContact/success.http +13 -13
- data/spec/fixtures.http/deleteDelegationSignerRecord/success.http +15 -15
- data/spec/fixtures.http/deleteDomain/success.http +11 -11
- data/spec/fixtures.http/deleteEmailForward/success.http +18 -18
- data/spec/fixtures.http/deleteRegistrantChange/success.http +13 -13
- data/spec/fixtures.http/deleteRegistrantChange/success_async.http +3 -3
- data/spec/fixtures.http/deleteTemplate/success.http +13 -13
- data/spec/fixtures.http/deleteTemplateRecord/success.http +13 -13
- data/spec/fixtures.http/deleteWebhook/success.http +13 -13
- data/spec/fixtures.http/deleteZoneRecord/success.http +11 -11
- data/spec/fixtures.http/disableDnssec/not-enabled.http +15 -15
- data/spec/fixtures.http/disableDnssec/success.http +15 -15
- data/spec/fixtures.http/disableDomainAutoRenewal/success.http +13 -13
- data/spec/fixtures.http/disableDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/disableVanityNameServers/success.http +15 -15
- data/spec/fixtures.http/disableWhoisPrivacy/success.http +16 -16
- data/spec/fixtures.http/dnsAnalytics/success.http +17 -17
- data/spec/fixtures.http/downloadCertificate/success.http +19 -19
- data/spec/fixtures.http/enableDnssec/success.http +17 -17
- data/spec/fixtures.http/enableDomainAutoRenewal/success.http +13 -13
- data/spec/fixtures.http/enableDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/enableVanityNameServers/success.http +17 -17
- data/spec/fixtures.http/enableWhoisPrivacy/created.http +16 -16
- data/spec/fixtures.http/enableWhoisPrivacy/success.http +16 -16
- data/spec/fixtures.http/getCertificate/success.http +19 -19
- data/spec/fixtures.http/getCertificatePrivateKey/success.http +20 -20
- data/spec/fixtures.http/getContact/success.http +16 -16
- data/spec/fixtures.http/getDelegationSignerRecord/success.http +17 -17
- data/spec/fixtures.http/getDnssec/success.http +17 -17
- data/spec/fixtures.http/getDomain/success.http +19 -19
- data/spec/fixtures.http/getDomainDelegation/success-empty.http +15 -15
- data/spec/fixtures.http/getDomainDelegation/success.http +15 -15
- data/spec/fixtures.http/getDomainPrices/failure.http +18 -18
- data/spec/fixtures.http/getDomainPrices/success.http +21 -21
- data/spec/fixtures.http/getDomainRegistration/success.http +20 -20
- data/spec/fixtures.http/getDomainRenewal/success.http +20 -20
- data/spec/fixtures.http/getDomainRestore/success.http +22 -22
- data/spec/fixtures.http/getDomainTransfer/success.http +19 -19
- data/spec/fixtures.http/getDomainTransferLock/success.http +17 -17
- data/spec/fixtures.http/getEmailForward/success.http +21 -21
- data/spec/fixtures.http/getPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/getRegistrantChange/success.http +15 -15
- data/spec/fixtures.http/getService/success.http +16 -16
- data/spec/fixtures.http/getTemplate/success.http +15 -15
- data/spec/fixtures.http/getTemplateRecord/success.http +16 -16
- data/spec/fixtures.http/getTld/success.http +20 -20
- data/spec/fixtures.http/getTldExtendedAttributes/success-attributes.http +15 -15
- data/spec/fixtures.http/getTldExtendedAttributes/success-noattributes.http +15 -15
- data/spec/fixtures.http/getTldExtendedAttributes/success.http +15 -15
- data/spec/fixtures.http/getWebhook/success.http +13 -13
- data/spec/fixtures.http/getZone/success.http +16 -16
- data/spec/fixtures.http/getZoneFile/success.http +17 -17
- data/spec/fixtures.http/getZoneRecord/success.http +17 -17
- data/spec/fixtures.http/initiatePush/success.http +17 -17
- data/spec/fixtures.http/issueLetsencryptCertificate/success.http +17 -17
- data/spec/fixtures.http/issueRenewalLetsencryptCertificate/success.http +17 -17
- data/spec/fixtures.http/linkPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/listAccounts/success-account.http +20 -20
- data/spec/fixtures.http/listAccounts/success-user.http +20 -20
- data/spec/fixtures.http/listCertificates/success.http +19 -19
- data/spec/fixtures.http/listCharges/fail-400-bad-filter.http +9 -9
- data/spec/fixtures.http/listCharges/fail-403.http +9 -9
- data/spec/fixtures.http/listCharges/success.http +9 -9
- data/spec/fixtures.http/listContacts/success.http +16 -16
- data/spec/fixtures.http/listDelegationSignerRecords/success.http +17 -17
- data/spec/fixtures.http/listDomains/success.http +19 -19
- data/spec/fixtures.http/listEmailForwards/success.http +13 -13
- data/spec/fixtures.http/listPrimaryServers/success.http +20 -20
- data/spec/fixtures.http/listPushes/success.http +17 -17
- data/spec/fixtures.http/listRegistrantChanges/success.http +15 -15
- data/spec/fixtures.http/listServices/success.http +17 -17
- data/spec/fixtures.http/listTemplateRecords/success.http +16 -16
- data/spec/fixtures.http/listTemplates/success.http +15 -15
- data/spec/fixtures.http/listTlds/success.http +20 -20
- data/spec/fixtures.http/listWebhooks/success.http +13 -13
- data/spec/fixtures.http/listZoneRecords/success.http +17 -17
- data/spec/fixtures.http/listZones/success.http +16 -16
- data/spec/fixtures.http/method-not-allowed.http +8 -8
- data/spec/fixtures.http/notfound-certificate.http +12 -12
- data/spec/fixtures.http/notfound-contact.http +10 -10
- data/spec/fixtures.http/notfound-delegationSignerRecord.http +8 -8
- data/spec/fixtures.http/notfound-domain.http +8 -8
- data/spec/fixtures.http/notfound-domainpush.http +8 -8
- data/spec/fixtures.http/notfound-emailforward.http +8 -8
- data/spec/fixtures.http/notfound-record.http +10 -10
- data/spec/fixtures.http/notfound-template.http +10 -10
- data/spec/fixtures.http/notfound-webhook.http +8 -8
- data/spec/fixtures.http/notfound-whoisprivacy.http +10 -10
- data/spec/fixtures.http/notfound-zone.http +10 -10
- data/spec/fixtures.http/oauthAccessToken/error-invalid-request.http +12 -12
- data/spec/fixtures.http/oauthAccessToken/success.http +16 -16
- data/spec/fixtures.http/pages-1of3.http +12 -12
- data/spec/fixtures.http/pages-2of3.http +12 -12
- data/spec/fixtures.http/pages-3of3.http +12 -12
- data/spec/fixtures.http/purchaseLetsencryptCertificate/success.http +19 -19
- data/spec/fixtures.http/purchaseRenewalLetsencryptCertificate/success.http +19 -19
- data/spec/fixtures.http/registerDomain/error-extended-attributes.http +15 -15
- data/spec/fixtures.http/registerDomain/success.http +20 -20
- data/spec/fixtures.http/rejectPush/success.http +15 -15
- data/spec/fixtures.http/renewDomain/error-tooearly.http +14 -14
- data/spec/fixtures.http/renewDomain/success.http +20 -20
- data/spec/fixtures.http/response.http +12 -12
- data/spec/fixtures.http/restoreDomain/success.http +22 -22
- data/spec/fixtures.http/success-with-malformed-json.http +4 -4
- data/spec/fixtures.http/transferDomain/error-indnsimple.http +13 -13
- data/spec/fixtures.http/transferDomain/error-missing-authcode.http +13 -13
- data/spec/fixtures.http/transferDomain/success.http +20 -20
- data/spec/fixtures.http/unapplyService/success.http +15 -15
- data/spec/fixtures.http/unlinkPrimaryServer/success.http +20 -20
- data/spec/fixtures.http/updateContact/success.http +16 -16
- data/spec/fixtures.http/updateTemplate/success.http +15 -15
- data/spec/fixtures.http/updateZoneNsRecords/success.http +16 -16
- data/spec/fixtures.http/updateZoneRecord/success.http +17 -17
- data/spec/fixtures.http/validation-error.http +15 -15
- data/spec/fixtures.http/whoami/success-account.http +15 -15
- data/spec/fixtures.http/whoami/success-user.http +15 -15
- data/spec/fixtures.http/whoami/success.http +15 -15
- data/spec/support/helpers.rb +0 -2
- metadata +7 -13
- data/lib/dnsimple/struct/whois_privacy_renewal.rb +0 -30
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_not_a_premium_domain.http +0 -18
- data/spec/fixtures.http/checkDomainPremiumPrice/error_400_tld_not_supported.http +0 -18
- data/spec/fixtures.http/checkDomainPremiumPrice/success.http +0 -20
- data/spec/fixtures.http/getDomainPremiumPrice/failure.http +0 -15
- data/spec/fixtures.http/getDomainPremiumPrice/success.http +0 -20
- data/spec/fixtures.http/getWhoisPrivacy/success.http +0 -16
- data/spec/fixtures.http/renewWhoisPrivacy/success.http +0 -20
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-duplicated-order.http +0 -18
- data/spec/fixtures.http/renewWhoisPrivacy/whois-privacy-not-found.http +0 -18
data/CONTRIBUTING.md
CHANGED
|
@@ -2,8 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
## Getting started
|
|
4
4
|
|
|
5
|
-
### 1. Clone the repository
|
|
6
|
-
|
|
7
5
|
Clone the repository and move into it:
|
|
8
6
|
|
|
9
7
|
```shell
|
|
@@ -11,47 +9,13 @@ git clone git@github.com:dnsimple/dnsimple-ruby.git
|
|
|
11
9
|
cd dnsimple-ruby
|
|
12
10
|
```
|
|
13
11
|
|
|
14
|
-
### 2. Install the dependencies
|
|
15
|
-
|
|
16
12
|
Install the dependencies using [Bundler](http://bundler.io/):
|
|
17
13
|
|
|
18
14
|
```shell
|
|
19
15
|
bundle
|
|
20
16
|
```
|
|
21
17
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
[Run the test suite](#testing) to check everything works as expected.
|
|
25
|
-
|
|
26
|
-
## Releasing
|
|
27
|
-
|
|
28
|
-
The following instructions uses `$VERSION` as a placeholder, where `$VERSION` is a `MAJOR.MINOR.BUGFIX` release such as `1.2.0`.
|
|
29
|
-
|
|
30
|
-
1. Set the version in `version.rb`:
|
|
31
|
-
|
|
32
|
-
```ruby
|
|
33
|
-
VERSION = "$VERSION"
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
1. Run the test suite and ensure all the tests pass.
|
|
37
|
-
|
|
38
|
-
1. Finalize the `## main` section in `CHANGELOG.md` assigning the version.
|
|
39
|
-
|
|
40
|
-
1. Commit and push the changes
|
|
41
|
-
|
|
42
|
-
```shell
|
|
43
|
-
git commit -a -m "Release $VERSION"
|
|
44
|
-
git push origin main
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
1. Wait for CI to complete.
|
|
48
|
-
|
|
49
|
-
1. Create a signed tag.
|
|
50
|
-
|
|
51
|
-
```shell
|
|
52
|
-
git tag -a v$VERSION -s -m "Release $VERSION"
|
|
53
|
-
git push origin --tags
|
|
54
|
-
```
|
|
18
|
+
Run the test suite to check everything works as expected.
|
|
55
19
|
|
|
56
20
|
## Testing
|
|
57
21
|
|
|
@@ -61,8 +25,10 @@ To run the test suite:
|
|
|
61
25
|
rake
|
|
62
26
|
```
|
|
63
27
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
Submit unit tests for your changes. You can test your changes on your machine by [running the test suite](#testing).
|
|
28
|
+
Submit unit tests for your changes. You can test your changes on your machine by running the test suite.
|
|
67
29
|
|
|
68
30
|
When you submit a PR, tests will also be run on the [continuous integration environment via GitHub Actions](https://github.com/dnsimple/dnsimple-ruby/actions).
|
|
31
|
+
|
|
32
|
+
## Changelog
|
|
33
|
+
|
|
34
|
+
We follow the [Common Changelog](https://common-changelog.org/) format for changelog entries.
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
The MIT License (MIT)
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2010-
|
|
3
|
+
Copyright (c) 2010-2026 DNSimple Corporation
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
data/README.md
CHANGED
|
@@ -11,6 +11,7 @@ We provide a full API and an easy-to-use web interface so you can get your domai
|
|
|
11
11
|
## Requirements
|
|
12
12
|
|
|
13
13
|
- Ruby: MRI > 3.2+
|
|
14
|
+
- An activated DNSimple account
|
|
14
15
|
|
|
15
16
|
## Installation
|
|
16
17
|
|
|
@@ -23,31 +24,10 @@ gem install dnsimple
|
|
|
23
24
|
Or use Bundler and define it as a dependency in your Gemfile:
|
|
24
25
|
|
|
25
26
|
```ruby
|
|
26
|
-
gem 'dnsimple', '~>
|
|
27
|
+
gem 'dnsimple', '~> 11.0'
|
|
27
28
|
```
|
|
28
29
|
|
|
29
|
-
##
|
|
30
|
-
|
|
31
|
-
### Relevant links
|
|
32
|
-
|
|
33
|
-
- [`dnsimple-ruby` RDocs](https://www.rubydoc.info/gems/dnsimple/).
|
|
34
|
-
- [DNSimple API documentation](https://developer.dnsimple.com).
|
|
35
|
-
- [DNSimple API examples repository](https://github.com/dnsimple/dnsimple-api-examples).
|
|
36
|
-
- [DNSimple support documentation](https://support.dnsimple.com).
|
|
37
|
-
|
|
38
|
-
### Sandbox Environment
|
|
39
|
-
|
|
40
|
-
We highly recommend testing against our [sandbox environment](https://developer.dnsimple.com/sandbox/) 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.
|
|
41
|
-
|
|
42
|
-
The client supports both the production and sandbox environment. To switch to sandbox pass the sandbox API host using the `base_url` option when you construct the client:
|
|
43
|
-
|
|
44
|
-
```ruby
|
|
45
|
-
client = Dnsimple::Client.new(base_url: "https://api.sandbox.dnsimple.com", access_token: "a1b2c3")
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
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.
|
|
49
|
-
|
|
50
|
-
### Examples
|
|
30
|
+
## Usage
|
|
51
31
|
|
|
52
32
|
Be sure to require the gem before trying any of the examples:
|
|
53
33
|
|
|
@@ -55,19 +35,7 @@ Be sure to require the gem before trying any of the examples:
|
|
|
55
35
|
require 'dnsimple'
|
|
56
36
|
```
|
|
57
37
|
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
You can customize the `User-Agent` header for the calls made to the DNSimple API:
|
|
61
|
-
|
|
62
|
-
```ruby
|
|
63
|
-
client = Dnsimple::Client.new(user_agent: "my-app/1.0")
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
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-ruby/0.14.0` (note that it will vary depending on the client version).
|
|
67
|
-
|
|
68
|
-
We recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.
|
|
69
|
-
|
|
70
|
-
#### Authentication
|
|
38
|
+
### Authentication
|
|
71
39
|
|
|
72
40
|
```ruby
|
|
73
41
|
client = Dnsimple::Client.new(access_token: "a1b2c3")
|
|
@@ -86,7 +54,7 @@ whoami = client.identity.whoami.data
|
|
|
86
54
|
account_id = whoami.account.id
|
|
87
55
|
```
|
|
88
56
|
|
|
89
|
-
|
|
57
|
+
### Listing your domains
|
|
90
58
|
|
|
91
59
|
```ruby
|
|
92
60
|
puts client.domains.list_domains(account_id).data # => domains from the account 1234, first page
|
|
@@ -94,20 +62,61 @@ puts client.domains.list_domains(account_id, query: { page: 3 }).data # => doma
|
|
|
94
62
|
puts client.domains.all_domains(account_id).data # => all domains from the account 1234 (use carefully)
|
|
95
63
|
```
|
|
96
64
|
|
|
97
|
-
|
|
65
|
+
### Create a domain
|
|
98
66
|
|
|
99
67
|
```ruby
|
|
100
68
|
response = client.domains.create_domain(account_id, name: "example.com")
|
|
101
69
|
puts response.data
|
|
102
70
|
```
|
|
103
71
|
|
|
104
|
-
|
|
72
|
+
### Get a domain
|
|
105
73
|
|
|
106
74
|
```ruby
|
|
107
75
|
response = client.domains.domain(account_id, "example.com")
|
|
108
76
|
puts response.data
|
|
109
77
|
```
|
|
110
78
|
|
|
79
|
+
## Configuration
|
|
80
|
+
|
|
81
|
+
### Sandbox Environment
|
|
82
|
+
|
|
83
|
+
We highly recommend testing against our [sandbox environment](https://developer.dnsimple.com/sandbox/) 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.
|
|
84
|
+
|
|
85
|
+
The client supports both the production and sandbox environment. To switch to sandbox pass the sandbox API host using the `base_url` option when you construct the client:
|
|
86
|
+
|
|
87
|
+
```ruby
|
|
88
|
+
client = Dnsimple::Client.new(base_url: "https://api.sandbox.dnsimple.com", access_token: "a1b2c3")
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
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.
|
|
92
|
+
|
|
93
|
+
### Setting a custom `User-Agent` header
|
|
94
|
+
|
|
95
|
+
You can customize the `User-Agent` header for the calls made to the DNSimple API:
|
|
96
|
+
|
|
97
|
+
```ruby
|
|
98
|
+
client = Dnsimple::Client.new(user_agent: "my-app/1.0")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
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-ruby/0.14.0` (note that it will vary depending on the client version).
|
|
102
|
+
|
|
103
|
+
We recommend to customize the user agent. If you are building a library or integration on top of the official client, customizing the client will help us to understand what is this client used for, and allow to contribute back or get in touch.
|
|
104
|
+
|
|
105
|
+
## Documentation
|
|
106
|
+
|
|
107
|
+
- [dnsimple-ruby RDocs](https://www.rubydoc.info/gems/dnsimple/).
|
|
108
|
+
- [DNSimple API documentation](https://developer.dnsimple.com).
|
|
109
|
+
- [DNSimple API examples repository](https://github.com/dnsimple/dnsimple-api-examples).
|
|
110
|
+
- [DNSimple support documentation](https://support.dnsimple.com).
|
|
111
|
+
|
|
112
|
+
## Contributing
|
|
113
|
+
|
|
114
|
+
Contributions are welcome! Please feel free to submit issues and pull requests. See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
115
|
+
|
|
116
|
+
## Changelog
|
|
117
|
+
|
|
118
|
+
See [CHANGELOG.md](CHANGELOG.md) for details.
|
|
119
|
+
|
|
111
120
|
## License
|
|
112
121
|
|
|
113
|
-
Copyright (c) 2010-
|
|
122
|
+
Copyright (c) 2010-2026 DNSimple Corporation. This is Free Software distributed under the [MIT License](LICENSE.txt).
|
data/RELEASING.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Releasing
|
|
2
|
+
|
|
3
|
+
This document describes the steps to release a new version of DNSimple/Ruby.
|
|
4
|
+
|
|
5
|
+
## Prerequisites
|
|
6
|
+
|
|
7
|
+
- You have commit access to the repository
|
|
8
|
+
- You have push access to the repository
|
|
9
|
+
- You have a GPG key configured for signing tags
|
|
10
|
+
- You have permission to publish to RubyGems
|
|
11
|
+
|
|
12
|
+
## Release process
|
|
13
|
+
|
|
14
|
+
1. **Determine the new version** using [Semantic Versioning](https://semver.org/)
|
|
15
|
+
|
|
16
|
+
```shell
|
|
17
|
+
VERSION=X.Y.Z
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
- **MAJOR** version for incompatible API changes
|
|
21
|
+
- **MINOR** version for backwards-compatible functionality additions
|
|
22
|
+
- **PATCH** version for backwards-compatible bug fixes
|
|
23
|
+
|
|
24
|
+
2. **Update the version file** with the new version
|
|
25
|
+
|
|
26
|
+
Edit `version.rb` and update the `VERSION` constant:
|
|
27
|
+
|
|
28
|
+
```ruby
|
|
29
|
+
VERSION = "$VERSION"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
3. **Run tests** and confirm they pass
|
|
33
|
+
|
|
34
|
+
```shell
|
|
35
|
+
rake
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
4. **Update the changelog** with the new version
|
|
39
|
+
|
|
40
|
+
Finalize the `## main` section in `CHANGELOG.md` assigning the version.
|
|
41
|
+
|
|
42
|
+
5. **Commit the new version**
|
|
43
|
+
|
|
44
|
+
```shell
|
|
45
|
+
git commit -a -m "Release $VERSION"
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
6. **Push the changes**
|
|
49
|
+
|
|
50
|
+
```shell
|
|
51
|
+
git push origin main
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
7. **Wait for CI to complete**
|
|
55
|
+
|
|
56
|
+
8. **Create a signed tag**
|
|
57
|
+
|
|
58
|
+
```shell
|
|
59
|
+
git tag -a v$VERSION -s -m "Release $VERSION"
|
|
60
|
+
git push origin --tags
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Post-release
|
|
64
|
+
|
|
65
|
+
- Verify the new version appears on [RubyGems](https://rubygems.org/gems/dnsimple)
|
|
66
|
+
- Verify the GitHub release was created
|
|
67
|
+
- Announce the release if necessary
|
data/dnsimple.gemspec
CHANGED
|
@@ -11,7 +11,7 @@ Gem::Specification.new do |s|
|
|
|
11
11
|
s.summary = 'The DNSimple API client for Ruby'
|
|
12
12
|
s.description = 'The DNSimple API client for Ruby.'
|
|
13
13
|
|
|
14
|
-
s.required_ruby_version =
|
|
14
|
+
s.required_ruby_version = ['>= 3.2', '< 5']
|
|
15
15
|
|
|
16
16
|
s.require_paths = ['lib']
|
|
17
17
|
s.files = `git ls-files`.split("\n")
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Accounts
|
|
6
|
-
|
|
7
6
|
# Lists the accounts the authenticated entity has access to.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/accounts
|
|
@@ -11,7 +10,7 @@ module Dnsimple
|
|
|
11
10
|
# @example List the accounts:
|
|
12
11
|
# client.accounts.list
|
|
13
12
|
#
|
|
14
|
-
# @param [Hash]
|
|
13
|
+
# @param options [Hash]
|
|
15
14
|
# @return [Dnsimple::Response<Dnsimple::Struct::Account>]
|
|
16
15
|
#
|
|
17
16
|
# @raise [Dnsimple::RequestError]
|
|
@@ -21,7 +20,6 @@ module Dnsimple
|
|
|
21
20
|
Dnsimple::Response.new(response, response["data"].map { |r| Struct::Account.new(r) })
|
|
22
21
|
end
|
|
23
22
|
alias list_accounts accounts
|
|
24
|
-
|
|
25
23
|
end
|
|
26
24
|
end
|
|
27
25
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Billing
|
|
6
|
-
|
|
7
6
|
# List the billing charges for the account.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/billing/#listCharges
|
|
@@ -17,8 +16,8 @@ module Dnsimple
|
|
|
17
16
|
# @example List charges, provide a sorting policy
|
|
18
17
|
# client.charges.list(1010, sort: "invoiced:asc")
|
|
19
18
|
#
|
|
20
|
-
# @param [Integer]
|
|
21
|
-
# @param [Hash]
|
|
19
|
+
# @param account_id [Integer] the account ID
|
|
20
|
+
# @param options [Hash] the filtering and sorting options
|
|
22
21
|
# @option options [Integer] :page current page (pagination)
|
|
23
22
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
24
23
|
# @option options [String] :sort sorting policy
|
|
@@ -31,7 +30,6 @@ module Dnsimple
|
|
|
31
30
|
Dnsimple::PaginatedResponse.new(response, response["data"].map { |r| Struct::Charge.new(r) })
|
|
32
31
|
end
|
|
33
32
|
alias list_charges charges
|
|
34
|
-
|
|
35
33
|
end
|
|
36
34
|
end
|
|
37
35
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Certificates
|
|
6
|
-
|
|
7
6
|
# List the certificates for the domain in the account.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/certificates/#listCertificates
|
|
@@ -284,7 +283,6 @@ module Dnsimple
|
|
|
284
283
|
|
|
285
284
|
Dnsimple::Response.new(response, Struct::Certificate.new(response["data"]))
|
|
286
285
|
end
|
|
287
|
-
|
|
288
286
|
end
|
|
289
287
|
end
|
|
290
288
|
end
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
module Dnsimple
|
|
4
|
-
|
|
5
4
|
class Client
|
|
6
|
-
|
|
7
5
|
# @return [Dnsimple::Client::AccountsService] The account-related API proxy.
|
|
8
6
|
def accounts
|
|
9
7
|
@services[:accounts] ||= Client::AccountsService.new(self)
|
|
@@ -82,7 +80,6 @@ module Dnsimple
|
|
|
82
80
|
|
|
83
81
|
# Struct
|
|
84
82
|
class ClientService
|
|
85
|
-
|
|
86
83
|
# @return [Dnsimple::Client]
|
|
87
84
|
attr_reader :client
|
|
88
85
|
|
|
@@ -94,8 +91,8 @@ module Dnsimple
|
|
|
94
91
|
#
|
|
95
92
|
# @api private
|
|
96
93
|
#
|
|
97
|
-
# @param [Symbol]
|
|
98
|
-
# @param [Array]
|
|
94
|
+
# @param method [Symbol] The client method to execute
|
|
95
|
+
# @param args [Array] The args to call the method with
|
|
99
96
|
# @return [Dnsimple::CollectionResponse]
|
|
100
97
|
def paginate(method, *args)
|
|
101
98
|
current_page = 0
|
|
@@ -116,41 +113,32 @@ module Dnsimple
|
|
|
116
113
|
|
|
117
114
|
CollectionResponse.new(response.http_response, collection)
|
|
118
115
|
end
|
|
119
|
-
|
|
120
116
|
end
|
|
121
117
|
|
|
122
118
|
|
|
123
119
|
require_relative "accounts"
|
|
124
120
|
|
|
125
121
|
class AccountsService < ClientService
|
|
126
|
-
|
|
127
122
|
include Client::Accounts
|
|
128
|
-
|
|
129
123
|
end
|
|
130
124
|
|
|
131
125
|
require_relative "billing"
|
|
132
126
|
|
|
133
127
|
class BillingService < ClientService
|
|
134
|
-
|
|
135
128
|
include Client::Billing
|
|
136
|
-
|
|
137
129
|
end
|
|
138
130
|
|
|
139
131
|
require_relative "certificates"
|
|
140
132
|
|
|
141
133
|
class CertificatesService < ClientService
|
|
142
|
-
|
|
143
134
|
include Client::Certificates
|
|
144
|
-
|
|
145
135
|
end
|
|
146
136
|
|
|
147
137
|
|
|
148
138
|
require_relative "contacts"
|
|
149
139
|
|
|
150
140
|
class ContactsService < ClientService
|
|
151
|
-
|
|
152
141
|
include Client::Contacts
|
|
153
|
-
|
|
154
142
|
end
|
|
155
143
|
|
|
156
144
|
|
|
@@ -161,39 +149,31 @@ module Dnsimple
|
|
|
161
149
|
require_relative "domains_pushes"
|
|
162
150
|
|
|
163
151
|
class DomainsService < ClientService
|
|
164
|
-
|
|
165
152
|
include Client::Domains
|
|
166
153
|
include Client::DomainsDelegationSignerRecords
|
|
167
154
|
include Client::DomainsDnssec
|
|
168
155
|
include Client::DomainsEmailForwards
|
|
169
156
|
include Client::DomainsPushes
|
|
170
|
-
|
|
171
157
|
end
|
|
172
158
|
|
|
173
159
|
require_relative "dns_analytics"
|
|
174
160
|
|
|
175
161
|
class DnsAnalyticsService < ClientService
|
|
176
|
-
|
|
177
162
|
include Client::DnsAnalytics
|
|
178
|
-
|
|
179
163
|
end
|
|
180
164
|
|
|
181
165
|
|
|
182
166
|
require_relative "identity"
|
|
183
167
|
|
|
184
168
|
class IdentityService < ClientService
|
|
185
|
-
|
|
186
169
|
include Client::Identity
|
|
187
|
-
|
|
188
170
|
end
|
|
189
171
|
|
|
190
172
|
|
|
191
173
|
require_relative "oauth"
|
|
192
174
|
|
|
193
175
|
class OauthService < ClientService
|
|
194
|
-
|
|
195
176
|
include Client::Oauth
|
|
196
|
-
|
|
197
177
|
end
|
|
198
178
|
|
|
199
179
|
require_relative "registrar"
|
|
@@ -204,14 +184,12 @@ module Dnsimple
|
|
|
204
184
|
require_relative "registrar_delegation"
|
|
205
185
|
|
|
206
186
|
class RegistrarService < ClientService
|
|
207
|
-
|
|
208
187
|
include Client::Registrar
|
|
209
188
|
include Client::RegistrarAutoRenewal
|
|
210
189
|
include Client::RegistrarDelegation
|
|
211
190
|
include Client::RegistrarRegistrantChanges
|
|
212
191
|
include Client::RegistrarTransferLock
|
|
213
192
|
include Client::RegistrarWhoisPrivacy
|
|
214
|
-
|
|
215
193
|
end
|
|
216
194
|
|
|
217
195
|
|
|
@@ -219,10 +197,8 @@ module Dnsimple
|
|
|
219
197
|
require_relative "services_domains"
|
|
220
198
|
|
|
221
199
|
class ServicesService < ClientService
|
|
222
|
-
|
|
223
200
|
include Client::Services
|
|
224
201
|
include Client::ServicesDomains
|
|
225
|
-
|
|
226
202
|
end
|
|
227
203
|
|
|
228
204
|
|
|
@@ -231,29 +207,23 @@ module Dnsimple
|
|
|
231
207
|
require_relative "templates_records"
|
|
232
208
|
|
|
233
209
|
class TemplatesService < ClientService
|
|
234
|
-
|
|
235
210
|
include Client::Templates
|
|
236
211
|
include Client::TemplatesDomains
|
|
237
212
|
include Client::TemplatesRecords
|
|
238
|
-
|
|
239
213
|
end
|
|
240
214
|
|
|
241
215
|
|
|
242
216
|
require_relative "tlds"
|
|
243
217
|
|
|
244
218
|
class TldsService < ClientService
|
|
245
|
-
|
|
246
219
|
include Client::Tlds
|
|
247
|
-
|
|
248
220
|
end
|
|
249
221
|
|
|
250
222
|
|
|
251
223
|
require_relative "vanity_name_servers"
|
|
252
224
|
|
|
253
225
|
class VanityNameServersService < ClientService
|
|
254
|
-
|
|
255
226
|
include Client::VanityNameServers
|
|
256
|
-
|
|
257
227
|
end
|
|
258
228
|
|
|
259
229
|
|
|
@@ -262,22 +232,17 @@ module Dnsimple
|
|
|
262
232
|
require_relative "zones_distributions"
|
|
263
233
|
|
|
264
234
|
class ZonesService < ClientService
|
|
265
|
-
|
|
266
235
|
include Client::Zones
|
|
267
236
|
include Client::ZonesRecords
|
|
268
237
|
include Client::ZonesDistributions
|
|
269
|
-
|
|
270
238
|
end
|
|
271
239
|
|
|
272
240
|
|
|
273
241
|
require_relative "webhooks"
|
|
274
242
|
|
|
275
243
|
class WebhooksService < ClientService
|
|
276
|
-
|
|
277
244
|
include Client::Webhooks
|
|
278
|
-
|
|
279
245
|
end
|
|
280
|
-
|
|
281
246
|
end
|
|
282
247
|
|
|
283
248
|
# This module exposes static helpers for the API v2.
|
|
@@ -286,9 +251,6 @@ module Dnsimple
|
|
|
286
251
|
# these static methods return directly the underlying data objects.
|
|
287
252
|
# Therefore, it's not possible to access response metadata such as throttling or pagination info.
|
|
288
253
|
module V2
|
|
289
|
-
|
|
290
254
|
extend Client::Identity::StaticHelpers
|
|
291
|
-
|
|
292
255
|
end
|
|
293
|
-
|
|
294
256
|
end
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module Contacts
|
|
6
|
-
|
|
7
6
|
# Lists the contacts in the account.
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/contacts/#list
|
|
@@ -18,8 +17,8 @@ module Dnsimple
|
|
|
18
17
|
# @example List contacts, provide a sorting policy
|
|
19
18
|
# client.contacts.list(1010, sort: "email:asc")
|
|
20
19
|
#
|
|
21
|
-
# @param [Integer]
|
|
22
|
-
# @param [Hash]
|
|
20
|
+
# @param account_id [Integer] the account ID
|
|
21
|
+
# @param options [Hash] the filtering and sorting options
|
|
23
22
|
# @option options [Integer] :page current page (pagination)
|
|
24
23
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
25
24
|
# @option options [String] :sort sorting policy
|
|
@@ -44,8 +43,8 @@ module Dnsimple
|
|
|
44
43
|
# @see https://developer.dnsimple.com/v2/contacts/#list
|
|
45
44
|
# @see #contacts
|
|
46
45
|
#
|
|
47
|
-
# @param [Integer]
|
|
48
|
-
# @param [Hash]
|
|
46
|
+
# @param account_id [Integer] the account ID
|
|
47
|
+
# @param options [Hash] the filtering and sorting options
|
|
49
48
|
# @option options [Integer] :page current page (pagination)
|
|
50
49
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
51
50
|
# @option options [String] :sort sorting policy
|
|
@@ -60,9 +59,9 @@ module Dnsimple
|
|
|
60
59
|
#
|
|
61
60
|
# @see https://developer.dnsimple.com/v2/contacts/#create
|
|
62
61
|
#
|
|
63
|
-
# @param [Integer]
|
|
64
|
-
# @param [Hash]
|
|
65
|
-
# @param [Hash]
|
|
62
|
+
# @param account_id [Integer] the account ID
|
|
63
|
+
# @param attributes [Hash]
|
|
64
|
+
# @param options [Hash]
|
|
66
65
|
# @return [Dnsimple::Response<Dnsimple::Struct::Contact>]
|
|
67
66
|
#
|
|
68
67
|
# @raise [Dnsimple::RequestError]
|
|
@@ -77,9 +76,9 @@ module Dnsimple
|
|
|
77
76
|
#
|
|
78
77
|
# @see https://developer.dnsimple.com/v2/contacts/#get
|
|
79
78
|
#
|
|
80
|
-
# @param [Integer]
|
|
81
|
-
# @param [#to_s]
|
|
82
|
-
# @param [Hash]
|
|
79
|
+
# @param account_id [Integer] the account ID
|
|
80
|
+
# @param contact_id [#to_s] the contact ID
|
|
81
|
+
# @param options [Hash]
|
|
83
82
|
# @return [Dnsimple::Response<Dnsimple::Struct::Contact>]
|
|
84
83
|
#
|
|
85
84
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -94,10 +93,10 @@ module Dnsimple
|
|
|
94
93
|
#
|
|
95
94
|
# @see https://developer.dnsimple.com/v2/contacts/#update
|
|
96
95
|
#
|
|
97
|
-
# @param [Integer]
|
|
98
|
-
# @param [#to_s]
|
|
99
|
-
# @param [Hash]
|
|
100
|
-
# @param [Hash]
|
|
96
|
+
# @param account_id [Integer] the account ID
|
|
97
|
+
# @param contact_id [#to_s] the contact ID
|
|
98
|
+
# @param attributes [Hash]
|
|
99
|
+
# @param options [Hash]
|
|
101
100
|
# @return [Dnsimple::Response<Dnsimple::Struct::Contact>]
|
|
102
101
|
#
|
|
103
102
|
# @raise [Dnsimple::RequestError]
|
|
@@ -113,9 +112,9 @@ module Dnsimple
|
|
|
113
112
|
#
|
|
114
113
|
# @see https://developer.dnsimple.com/v2/contacts/#delete
|
|
115
114
|
#
|
|
116
|
-
# @param [Integer]
|
|
117
|
-
# @param [#to_s]
|
|
118
|
-
# @param [Hash]
|
|
115
|
+
# @param account_id [Integer] the account ID
|
|
116
|
+
# @param contact_id [#to_s] the contact ID
|
|
117
|
+
# @param options [Hash]
|
|
119
118
|
# @return [Dnsimple::Response<nil>]
|
|
120
119
|
#
|
|
121
120
|
# @raise [Dnsimple::NotFoundError]
|
|
@@ -125,7 +124,6 @@ module Dnsimple
|
|
|
125
124
|
|
|
126
125
|
Dnsimple::Response.new(response, nil)
|
|
127
126
|
end
|
|
128
|
-
|
|
129
127
|
end
|
|
130
128
|
end
|
|
131
129
|
end
|
|
@@ -3,13 +3,12 @@
|
|
|
3
3
|
module Dnsimple
|
|
4
4
|
class Client
|
|
5
5
|
module DnsAnalytics
|
|
6
|
-
|
|
7
6
|
# Queries DNS Analytics data for the provided account
|
|
8
7
|
#
|
|
9
8
|
# @see https://developer.dnsimple.com/v2/dns-analytics#queryDnsAnalytics
|
|
10
9
|
#
|
|
11
|
-
# @param [Integer]
|
|
12
|
-
# @param [Hash]
|
|
10
|
+
# @param account_id [Integer] the account ID
|
|
11
|
+
# @param options [Hash] the filtering, sorting, and grouping options
|
|
13
12
|
# @option options [Integer] :page current page (pagination)
|
|
14
13
|
# @option options [Integer] :per_page number of entries to return (pagination)
|
|
15
14
|
# @option options [String] :sort sorting policy
|
|
@@ -24,7 +23,6 @@ module Dnsimple
|
|
|
24
23
|
|
|
25
24
|
Dnsimple::PaginatedResponseWithQuery.new(response, response["data"]["rows"].map { |row| Struct::DnsAnalytics.new(response["data"]["headers"].zip(row)) })
|
|
26
25
|
end
|
|
27
|
-
|
|
28
26
|
end
|
|
29
27
|
end
|
|
30
28
|
end
|