Sha256: f495042baace97820c26246f7496432dc9484a2c3b9ed4ad529a2e5cb165f74a
Contents?: true
Size: 683 Bytes
Versions: 18
Compression:
Stored size: 683 Bytes
Contents
# frozen_string_literal: true require_relative "base" module Neetob class CLI module Cloudflare class BotFightMode < Base attr_accessor :domain def initialize(domain) super() @domain = domain end def run zone_id = ZONE_IDS[domain.to_sym] raise(StandardError, "Domain '#{domain}' not found.") if zone_id.nil? url = create_url(zone_id, "bot_management") response = get(url) ui.info( "Bot fight mode is turned #{response[:result][:fight_mode] ? print_success("on") : print_failure("off")}") end end end end end
Version data entries
18 entries across 18 versions & 1 rubygems