Class: Hook0::Generated::InstanceApi

Inherits:
Object
  • Object
show all
Defined in:
lib/hook0/generated/api.rb

Overview

What the API declares under instance, issued through the transport it is handed.

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ InstanceApi

Returns a new instance of InstanceApi.

Parameters:

  • transport (Object)

    what one request is issued through



590
591
592
# File 'lib/hook0/generated/api.rb', line 590

def initialize(transport)
  @transport = transport
end

Instance Method Details

#getInstanceConfig

Get instance configuration

Returns:



597
598
599
600
601
602
603
604
605
606
607
# File 'lib/hook0/generated/api.rb', line 597

def get
  read_answer(
    @transport.request(
      "GET",
      "/api/v1/instance/",
      [],
      nil
    ),
    InstanceConfig.method(:from_json)
  )
end