Search Results for

    Show / Hide Table of Contents

    Interface IWaitForControllerApiAsync

    Represents a collection of functions to interact with the API endpoints

    Inherited Members
    IApiAccessor.Configuration
    IApiAccessor.GetBasePath()
    IApiAccessor.ExceptionFactory
    Namespace: mailslurp.Api
    Assembly: mailslurp.dll
    Syntax
    public interface IWaitForControllerApiAsync : IApiAccessor

    Methods

    View Source

    WaitForAsync(WaitForConditions, int, CancellationToken)

    Wait for an email to match the provided filter conditions such as subject contains keyword.

    Declaration
    Task<List<EmailPreview>> WaitForAsync(WaitForConditions waitForConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForConditions waitForConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><EmailPreview>>

    Task of List<EmailPreview>

    Remarks

    Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForEmailCountAsync(Guid, int, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs

    Declaration
    Task<List<EmailPreview>> WaitForEmailCountAsync(Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater that 1

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><EmailPreview>>

    Task of List<EmailPreview>

    Remarks

    If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForEmailCountWithHttpInfoAsync(Guid, int, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for and return count number of emails. Hold connection until inbox count matches expected or timeout occurs

    Declaration
    Task<ApiResponse<List<EmailPreview>>> WaitForEmailCountWithHttpInfoAsync(Guid inboxId, int count, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater that 1

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><EmailPreview>>>

    Task of ApiResponse (List<EmailPreview>)

    Remarks

    If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestEmailAsync(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Fetch inbox's latest email or if empty wait for an email to arrive

    Declaration
    Task<Email> WaitForLatestEmailAsync(Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox we are fetching emails from (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only. (optional, default to false)

    DateTime? before

    Filter for emails that were before after the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<Email>

    Task of Email

    Remarks

    Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestEmailWithHttpInfoAsync(Guid?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Fetch inbox's latest email or if empty wait for an email to arrive

    Declaration
    Task<ApiResponse<Email>> WaitForLatestEmailWithHttpInfoAsync(Guid? inboxId = null, long? timeout = null, bool? unreadOnly = null, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox we are fetching emails from (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only. (optional, default to false)

    DateTime? before

    Filter for emails that were before after the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<Email>>

    Task of ApiResponse (Email)

    Remarks

    Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox set unreadOnly=true or see the other receive methods such as waitForNthEmail or waitForEmailCount.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestSmsAsync(WaitForSingleSmsOptions, int, CancellationToken)

    Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.

    Declaration
    Task<SmsDto> WaitForLatestSmsAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSingleSmsOptions waitForSingleSmsOptions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<SmsDto>

    Task of SmsDto

    Remarks

    Wait until a phone number meets given conditions or return immediately if already met

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForLatestSmsWithHttpInfoAsync(WaitForSingleSmsOptions, int, CancellationToken)

    Wait for the latest SMS message to match the provided filter conditions such as body contains keyword.

    Declaration
    Task<ApiResponse<SmsDto>> WaitForLatestSmsWithHttpInfoAsync(WaitForSingleSmsOptions waitForSingleSmsOptions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSingleSmsOptions waitForSingleSmsOptions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<SmsDto>>

    Task of ApiResponse (SmsDto)

    Remarks

    Wait until a phone number meets given conditions or return immediately if already met

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingEmailsAsync(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int, CancellationToken)

    Wait or return list of emails that match simple matching patterns

    Declaration
    Task<List<EmailPreview>> WaitForMatchingEmailsAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater or equal to 1

    MatchOptions matchOptions
    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><EmailPreview>>

    Task of List<EmailPreview>

    Remarks

    Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingEmailsWithHttpInfoAsync(Guid, int, MatchOptions, DateTime?, DateTime?, string, long?, long?, bool?, int, CancellationToken)

    Wait or return list of emails that match simple matching patterns

    Declaration
    Task<ApiResponse<List<EmailPreview>>> WaitForMatchingEmailsWithHttpInfoAsync(Guid inboxId, int count, MatchOptions matchOptions, DateTime? before = null, DateTime? since = null, string sort = null, long? delay = null, long? timeout = null, bool? unreadOnly = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are fetching emails from

    int count

    Number of emails to wait for. Must be greater or equal to 1

    MatchOptions matchOptions
    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><EmailPreview>>>

    Task of ApiResponse (List<EmailPreview>)

    Remarks

    Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingFirstEmailAsync(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or return the first email that matches provided MatchOptions array

    Declaration
    Task<Email> WaitForMatchingFirstEmailAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are matching an email for

    MatchOptions matchOptions
    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<Email>

    Task of Email

    Remarks

    Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForMatchingFirstEmailWithHttpInfoAsync(Guid, MatchOptions, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or return the first email that matches provided MatchOptions array

    Declaration
    Task<ApiResponse<Email>> WaitForMatchingFirstEmailWithHttpInfoAsync(Guid inboxId, MatchOptions matchOptions, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid inboxId

    Id of the inbox we are matching an email for

    MatchOptions matchOptions
    long? timeout

    Max milliseconds to wait (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<Email>>

    Task of ApiResponse (Email)

    Remarks

    Perform a search of emails in an inbox with the given patterns. If a result if found then return or else retry the search until a result is found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the MatchOptions object for options. An example payload is { matches: [{field: &apos;SUBJECT&apos;,should:&apos;CONTAIN&apos;,value:&apos;needle&apos;}] }. You can use an array of matches and they will be applied sequentially to filter out emails. If you want to perform matches and extractions of content using Regex patterns see the EmailController getEmailContentMatch method.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForNthEmailAsync(Guid?, int?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur.

    Declaration
    Task<Email> WaitForNthEmailAsync(Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox you are fetching emails from (optional)

    int? index

    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 (optional, default to 0)

    long? timeout

    Max milliseconds to wait for the nth email if not already present (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<Email>

    Task of Email

    Remarks

    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.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForNthEmailWithHttpInfoAsync(Guid?, int?, long?, bool?, DateTime?, DateTime?, string, long?, int, CancellationToken)

    Wait for or fetch the email with a given index in the inbox specified. If index doesn't exist waits for it to exist or timeout to occur.

    Declaration
    Task<ApiResponse<Email>> WaitForNthEmailWithHttpInfoAsync(Guid? inboxId = null, int? index = null, long? timeout = null, bool? unreadOnly = null, DateTime? since = null, DateTime? before = null, string sort = null, long? delay = null, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    System.Guid? inboxId

    Id of the inbox you are fetching emails from (optional)

    int? index

    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 (optional, default to 0)

    long? timeout

    Max milliseconds to wait for the nth email if not already present (optional)

    bool? unreadOnly

    Optional filter for unread only (optional, default to false)

    DateTime? since

    Filter for emails that were received after the given timestamp (optional)

    DateTime? before

    Filter for emails that were received before the given timestamp (optional)

    string sort

    Sort direction (optional)

    long? delay

    Max milliseconds delay between calls (optional)

    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<Email>>

    Task of ApiResponse (Email)

    Remarks

    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.

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForSmsAsync(WaitForSmsConditions, int, CancellationToken)

    Wait for an SMS message to match the provided filter conditions such as body contains keyword.

    Declaration
    Task<List<SmsPreview>> WaitForSmsAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSmsConditions waitForSmsConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<System.Collections.Generic.List<T><SmsPreview>>

    Task of List<SmsPreview>

    Remarks

    Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForSmsWithHttpInfoAsync(WaitForSmsConditions, int, CancellationToken)

    Wait for an SMS message to match the provided filter conditions such as body contains keyword.

    Declaration
    Task<ApiResponse<List<SmsPreview>>> WaitForSmsWithHttpInfoAsync(WaitForSmsConditions waitForSmsConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForSmsConditions waitForSmsConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><SmsPreview>>>

    Task of ApiResponse (List<SmsPreview>)

    Remarks

    Generic waitFor method that will wait until a phone number meets given conditions or return immediately if already met

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    View Source

    WaitForWithHttpInfoAsync(WaitForConditions, int, CancellationToken)

    Wait for an email to match the provided filter conditions such as subject contains keyword.

    Declaration
    Task<ApiResponse<List<EmailPreview>>> WaitForWithHttpInfoAsync(WaitForConditions waitForConditions, int operationIndex = 0, CancellationToken cancellationToken = default)
    Parameters
    Type Name Description
    WaitForConditions waitForConditions
    int operationIndex

    Index associated with the operation.

    CancellationToken cancellationToken

    Cancellation Token to cancel the request.

    Returns
    Type Description
    Task<ApiResponse<System.Collections.Generic.List<T><EmailPreview>>>

    Task of ApiResponse (List<EmailPreview>)

    Remarks

    Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met

    Exceptions
    Type Condition
    ApiException

    Thrown when fails to make API call

    • View Source
    In This Article
    Back to top See MailSlurp website for more information.