storagezone_list.go raw

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