Sha256: 2528fc29bca90867adb4842d650b691224238b222f3323d5190959cea44739f0
Contents?: true
Size: 658 Bytes
Versions: 10
Compression:
Stored size: 658 Bytes
Contents
module Hawkular::Metrics class Client < Hawkular::BaseClient # Provides access to tenants API class Tenants # @param client [Client] def initialize(client) @client = client @resource = 'tenants' end # Create new tenant # @param id [String] tenant ID/Name def create(id) @client.http_post("/#{@resource}", { id: id }, @client.admin_header) end # Query existing tenants # @return [Array[Tenant]] def query @client.http_get("/#{@resource}", @client.admin_header).map do |t| Hawkular::Metrics::Tenant.new(t) end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems