Sha256: 6b52e55867f030b72709a7b2c55888b89c4d7ab1f7d446668ee2edf68c289701

Contents?: true

Size: 998 Bytes

Versions: 15

Compression:

Stored size: 998 Bytes

Contents

class Ey::Core::Client
  class Real
    def get_slot_components(params={})
      query = Ey::Core.paging_parameters(params)
      url   = params.delete("url")

      request(
        :params => params,
        :query  => query,
        :path   => "/slot-components",
        :url    => url,
      )
    end
  end # Real
  class Mock
    def get_slot_components(params={})
      extract_url_params!(params)

      if cluster_id = resource_identity(params.delete("cluster"))
        params["cluster"] = url_for("/clusters/#{cluster_id}")
      end

      if environment_id = resource_identity(params.delete("environment"))
        params["environment"] = url_for("/environments/#{environment_id}")
      end

      headers, slot_components_page = search_and_page(params, :slot_components, search_keys: %w[slot cluster environment])

      response(
        :body    => {"slot_components" => slot_components_page},
        :status  => 200,
        :headers => headers
      )
    end
  end # Mock
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
ey-pro-cli-0.0.17 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.16 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.15 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.14 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.13 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.12 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.11 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.10 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.9 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.8 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.7 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.6 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.5 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.4 lib/vendor/core/ey-core/requests/get_slot_components.rb
ey-pro-cli-0.0.3 lib/vendor/core/ey-core/requests/get_slot_components.rb