Class: Imperium::Catalog
- Defined in:
- lib/imperium/catalog.rb,
lib/imperium/catalog/service.rb
Overview
A client for the Catalog API.
Defined Under Namespace
Classes: Service
Constant Summary
Constants inherited from Client
Imperium::Client::UNIVERSAL_API_OPTIONS
Instance Attribute Summary
Attributes inherited from Client
Instance Method Summary collapse
-
#list_nodes_for_service(service) ⇒ Array<Service>
List the known nodes for the given service in the global catalog.
-
#list_services ⇒ Response
List services in the global catalog.
Methods inherited from Client
default_client, inherited, #initialize, #path_prefix, reset_default_client, reset_default_clients
Constructor Details
This class inherits a constructor from Imperium::Client
Instance Method Details
#list_nodes_for_service(service) ⇒ Array<Service>
23 24 25 26 |
# File 'lib/imperium/catalog.rb', line 23 def list_nodes_for_service(service) response = @http_client.get(prefix_path("service/#{service}")) Response.new(response, response_object_class: Service) end |
#list_services ⇒ Response
List services in the global catalog
11 12 13 14 |
# File 'lib/imperium/catalog.rb', line 11 def list_services response = @http_client.get(prefix_path('services')) Response.new(response) end |