Sha256: 5c836c2eafeb9f6c206f701f4bce0b3163d6c00029b413abe5555b0e2e7a93fd
Contents?: true
Size: 616 Bytes
Versions: 3
Compression:
Stored size: 616 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] ? "on" : "off"}") end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
neetob-0.4.36 | lib/neetob/cli/cloudflare/bot_fight_mode.rb |
neetob-0.4.35 | lib/neetob/cli/cloudflare/bot_fight_mode.rb |
neetob-0.4.34 | lib/neetob/cli/cloudflare/bot_fight_mode.rb |