Class StableHordeAsyncRequestHandler

Hierarchy

  • StableHordeAsyncRequestHandler

Constructors

Methods

Constructors

Methods

  • Creates a new image generation request emitting the create event. Then it will poll the status of the request until it is done, emitting a statusPolled event on every iteration. When the request is done, it will emit a finished event.

    Returns

    A reference to itself.

    Parameters

    Returns Promise<StableHordeAsyncRequestHandler>

  • Unregisters an event handler.

    Parameters

    • Optional event: string

      The event to unregister.

    Returns void

  • Registers an event handler for the created event. This event will run when the request is created on Stable Horde's API.

    Parameters

    Returns void

  • Registers an event handler for the statusPolled event. This event will run every time the status of the request is polled.

    Parameters

    Returns void

  • Registers an event handler for the finished event. This event will run when the image generation has finished.

    Parameters

    Returns void

  • Registers an event for the error event. This event will run when an error occurs.

    Parameters

    • Optional event: "error"

      Error event.

    • Optional handler: ((data: any) => void)

      The callback. Receives an error as its only argument.

        • (data: any): void
        • Parameters

          • data: any

          Returns void

    Returns void

Generated using TypeDoc