27 lines
826 B
C#
27 lines
826 B
C#
using Castle.Core.Logging;
|
|
|
|
namespace Pilz.Net.Api;
|
|
|
|
public interface IApiClient
|
|
{
|
|
string ApiUrl { get; }
|
|
|
|
string? AuthKey { get; set; }
|
|
|
|
IMessageSerializer Serializer { get; }
|
|
|
|
ILogger Log { get; set; }
|
|
|
|
Task<ApiResponse> SendRequest(string route);
|
|
|
|
Task<ApiResponse> SendRequest(string route, ApiMessage? message);
|
|
|
|
Task<ApiResponse> SendRequest(string route, ApiMessage? message, IMessageSerializer? serializer);
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route) where TResponse : ApiMessage;
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, ApiMessage? message) where TResponse : ApiMessage;
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, ApiMessage? message, IMessageSerializer? serializer) where TResponse : ApiMessage;
|
|
}
|