Skip to content

ISignalBotClient

Namespace: Signal.Bot

Full Name: Signal.Bot.ISignalBotClient

Summary

Defines the core interface for interacting with the Signal Bot API, providing methods for sending requests and observing API interactions.

Properties

BaseUrl

Gets the base URL of the Signal Bot API endpoint.

Number

Gets the Signal phone number associated with this bot client.

JsonSerializerOptions

Gets the JSON serialization options used for request and response serialization.

OnApiRequest

Observable stream of outgoing API request events for monitoring and logging purposes.

OnApiResponse

Observable stream of incoming API response events for monitoring and logging purposes.

OnException

Observable stream of exceptions that occur during API interactions.

Methods

SendAsync

csharp
SendAsync(request, queryParameters, cancellationToken)

Sends an HTTP request to the Signal Bot API and returns the raw HTTP response.

Parameters:

  • request - The request to send.
  • queryParameters - Optional query parameters to append to the request URL.
  • cancellationToken - Cancellation token to cancel the operation.

Returns: The HTTP response message.

SendRequestAsync

csharp
SendRequestAsync(request, queryParameters, cancellationToken)

Sends a request to the Signal Bot API without expecting a response body.

Parameters:

  • request - The request to send.
  • queryParameters - Optional query parameters to append to the request URL.
  • cancellationToken - Cancellation token to cancel the operation.

Returns: A task that completes when the request is sent successfully.

SendRequestAsync``1

csharp
SendRequestAsync``1(request, queryParameters, cancellationToken)

Sends a request to the Signal Bot API and deserializes the response to the specified type.

Parameters:

  • request - The request to send.
  • queryParameters - Optional query parameters to append to the request URL.
  • cancellationToken - Cancellation token to cancel the operation.

Returns: The deserialized response of type TResponse.