Sha256: c54ef85a4bb97af38066c1c090b03c27ed499dfba3d42c9a47ed1a3e6bac16c5

Contents?: true

Size: 219 Bytes

Versions: 16

Compression:

Stored size: 219 Bytes

Contents

# frozen_string_literal: true

class ControlplaneApiCli
  def call(url, method:)
    response = `cpln rest #{method} #{url} -o json`
    raise(response) unless $CHILD_STATUS.success?

    JSON.parse(response)
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
cpl-1.4.0 lib/core/controlplane_api_cli.rb
cpl-1.3.0 lib/core/controlplane_api_cli.rb
cpl-1.2.0 lib/core/controlplane_api_cli.rb
cpl-1.1.2 lib/core/controlplane_api_cli.rb
cpl-1.1.2.rc.0 lib/core/controlplane_api_cli.rb
cpl-1.1.1 lib/core/controlplane_api_cli.rb
cpl-1.1.0 lib/core/controlplane_api_cli.rb
cpl-1.0.4 lib/core/controlplane_api_cli.rb
cpl-1.0.3 lib/core/controlplane_api_cli.rb
cpl-1.0.2 lib/core/controlplane_api_cli.rb
cpl-1.0.1 lib/core/controlplane_api_cli.rb
cpl-1.0.0 lib/core/controlplane_api_cli.rb
cpl-0.7.0 lib/core/controlplane_api_cli.rb
cpl-0.6.0 lib/core/controlplane_api_cli.rb
cpl-0.5.1 lib/core/controlplane_api_cli.rb
cpl-0.5.0 lib/core/controlplane_api_cli.rb