1 package bunny
2 3 import "context"
4 5 // DNSZones represents the response of the List DNS Zone API endpoint.
6 //
7 // Bunny.net API docs: https://docs.bunny.net/reference/dnszonepublic_index
8 type DNSZones PaginationReply[DNSZone]
9 10 // List retrieves the DNS Zones.
11 // If opts is nil, DefaultPaginationPerPage and DefaultPaginationPage will be used.
12 // if opts.Page or opts.PerPage is < 1, the related DefaultPagination values are used.
13 //
14 // Bunny.net API docs: https://docs.bunny.net/reference/dnszonepublic_index
15 func (s *DNSZoneService) List(ctx context.Context, opts *PaginationOptions) (*DNSZones, error) {
16 return resourceList[DNSZones](ctx, s.client, "/dnszone", opts)
17 }
18