Sha256: 988b9aa3aec943b5757555954f2dace85520c214a22a3c202f3c3234b4af094e

Contents?: true

Size: 1.17 KB

Versions: 9

Compression:

Stored size: 1.17 KB

Contents

# frozen_string_literal: true

module Evostream
  # Concern all command sending to evoStream
  module Commands
    # Abstract class for create element
    class Destroy < Command
      def initialize(commands = { group_name: 'null', remove_hls_hds_files: 1 })
        super(commands)
      end

      def cmd
        "removeConfig?params=#{Base64.urlsafe_encode64(command.join)}"
      end

      private

      attr_reader :command

      # The configId of the configuration that needs to be removed. ConfigIds
      # can be obtained from the listConfig interface. Removing an inbound
      # stream will also automatically remove all associated outbound streams.
      def id(param = 'null')
        "id=#{param} "
      end

      # The name of the group that needs to be removed (applicable to HLS, HDS
      # and external processes). *Mandatory only if the id parameter is not
      # specified.
      def group_name(param = 'null')
        "groupName=#{param} "
      end

      # If 1 (true) and the stream is HLS or HDS, the folder associated with it
      # will be removed
      def remove_hls_hds_files(param = 0)
        "removeHlsHdsFiles=#{param} "
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
evostream-event-0.2.0.pre.22 lib/evostream/event/commands/destroy.rb
evostream-event-0.1.2.pre.20 lib/evostream/event/commands/destroy.rb
evostream-event-0.1.1 lib/evostream/event/commands/destroy.rb
evostream-event-0.1.0 lib/evostream/commands/destroy.rb
evostream-event-0.1.0.pre.14 lib/evostream/commands/destroy.rb
evostream-event-0.1.0.pre.10 lib/evostream/commands/destroy.rb
evostream-event-0.1.0.pre.9 lib/evostream/commands/destroy.rb
evostream-event-0.1.0.pre.42 lib/evostream/commands/destroy.rb
evostream-event-0.1.0.pre.6 lib/evostream/commands/destroy.rb