MailSlurpAPI.Api.WaitForController.wait_for_nth_email

You're seeing just the function wait_for_nth_email, go back to MailSlurpAPI.Api.WaitForController module for more information.
Link to this function

wait_for_nth_email(connection, opts \\ [])

Specs

wait_for_nth_email(Tesla.Env.client(), keyword()) ::
  {:ok, MailSlurpAPI.Model.Email.t()} | {:error, Tesla.Env.t()}

Wait for or fetch the email with a given index in the inbox specified If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.

Parameters

  • connection (MailSlurpAPI.Connection): Connection to server
  • opts (KeywordList): [optional] Optional parameters
    • :inbox_id (String.t): Id of the inbox you are fetching emails from
    • :index (integer()): Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1
    • :timeout (integer()): Max milliseconds to wait for the nth email if not already present
    • :unread_only (boolean()): Optional filter for unread only

      Returns

} on success {:error, info} on failure