Class: Hook0::Generated::PayloadContentTypesApi

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ PayloadContentTypesApi

Returns a new instance of PayloadContentTypesApi.

Parameters:

  • transport (Object)

    what one request is issued through



626
627
628
# File 'lib/hook0/generated/api.rb', line 626

def initialize(transport)
  @transport = transport
end

Instance Method Details

#listArray<String>

List supported event payload content types

Returns:

  • (Array<String>)


633
634
635
636
637
638
639
640
641
642
643
# File 'lib/hook0/generated/api.rb', line 633

def list
  read_answer(
    @transport.request(
      "GET",
      "/api/v1/payload_content_types/",
      [],
      nil
    ),
    Runtime.list(Runtime::TEXT)
  )
end