pullzone_list.go raw

   1  package bunny
   2  
   3  import "context"
   4  
   5  // PullZones represents the response of the List Pull Zone API endpoint.
   6  //
   7  // Bunny.net API docs: https://docs.bunny.net/reference/pullzonepublic_index
   8  type PullZones PaginationReply[PullZone]
   9  
  10  // List retrieves the Pull 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/pullzonepublic_index
  15  func (s *PullZoneService) List(ctx context.Context, opts *PaginationOptions) (*PullZones, error) {
  16  	return resourceList[PullZones](ctx, s.client, "/pullzone", opts)
  17  }
  18