Class: Hook0::Generated::ErrorsApi

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

Overview

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

Instance Method Summary collapse

Constructor Details

#initialize(transport) ⇒ ErrorsApi

Returns a new instance of ErrorsApi.

Parameters:

  • transport (Object)

    what one request is issued through



252
253
254
# File 'lib/hook0/generated/api.rb', line 252

def initialize(transport)
  @transport = transport
end

Instance Method Details

#listArray<Problem>

List errors

Returns:



259
260
261
262
263
264
265
266
267
268
269
# File 'lib/hook0/generated/api.rb', line 259

def list
  read_answer(
    @transport.request(
      "GET",
      "/api/v1/errors/",
      [],
      nil
    ),
    Runtime.list(Problem.method(:from_json))
  )
end