lib/cloudflare_client/zone.rb
##
# list_zones will either list all zones or search for zones based on params
# results are paginated!
# list_zones(name: name_of_zone, status: active|pending, page: page_no)
list_zones will either list all zones or search for zones based on params
results are paginated.
list_zones will either list all zones or search for zones based on params results are paginated .
def zones(name: nil, status: nil, per_page: 50, page: 1)
      params            = {}
      params[:per_page] = per_page
      params[:page]     = page
      params[:name]     = name unless name.nil?
      unless status.nil?
        raise "status must be one of #{VALID_ZONE_STATUSES.flatten}" unless VALID_ZONE_STATUSES.include?(status)
        params[:status] = status
      end
      cf_get(path: '/zones', params: params)
    end
def zones ( name : nil , status : nil , per_page : 50 , page : 1 ) params = { } params [ :per_page ] = per_page params [ :page ] = page params [ :name ] = name unless name . nil? unless status . nil? raise "status must be one of #{VALID_ZONE_STATUSES.flatten}" unless VALID_ZONE_STATUSES . include? ( status ) params [ :status ] = status end cf_get ( path : '/zones' , params : params ) end
list_zones will either list all zones or search for zones based on params
results are paginated!
list_zones will either list all zones or search for zones based on params results are paginated!
name
<not_specific>
status
<not_specific>
per_page
<not_specific>
page
<not_specific>