forked from simplesurance/bunny-go
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdnszone_list.go
More file actions
17 lines (14 loc) · 669 Bytes
/
dnszone_list.go
File metadata and controls
17 lines (14 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package bunny
import "context"
// DNSZones represents the response of the List DNS Zone API endpoint.
//
// Bunny.net API docs: https://docs.bunny.net/reference/dnszonepublic_index
type DNSZones PaginationReply[DNSZone]
// List retrieves the DNS Zones.
// If opts is nil, DefaultPaginationPerPage and DefaultPaginationPage will be used.
// if opts.Page or opts.PerPage is < 1, the related DefaultPagination values are used.
//
// Bunny.net API docs: https://docs.bunny.net/reference/dnszonepublic_index
func (s *DNSZoneService) List(ctx context.Context, opts *PaginationOptions) (*DNSZones, error) {
return resourceList[DNSZones](ctx, s.client, "/dnszone", opts)
}