- allow parameters within url - allow different methods other then just POST -> still needs to be tested!
35 lines
1.3 KiB
C#
35 lines
1.3 KiB
C#
using Castle.Core.Logging;
|
|
|
|
namespace Pilz.Net.Api;
|
|
|
|
public interface IApiClient
|
|
{
|
|
string ApiUrl { get; }
|
|
|
|
string? AuthKey { get; set; }
|
|
|
|
IApiMessageSerializer Serializer { get; }
|
|
|
|
ILogger Log { get; set; }
|
|
|
|
Task<ApiResponse> SendRequest(string route);
|
|
|
|
Task<ApiResponse> SendRequest(string route, HttpMethod method);
|
|
|
|
Task<ApiResponse> SendRequest(string route, ApiMessage? message);
|
|
|
|
Task<ApiResponse> SendRequest(string route, HttpMethod method, ApiMessage? message);
|
|
|
|
Task<ApiResponse> SendRequest(string route, HttpMethod method, ApiMessage? message, IApiMessageSerializer? serializer);
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route) where TResponse : ApiMessage;
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, HttpMethod method) where TResponse : ApiMessage;
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, ApiMessage? message) where TResponse : ApiMessage;
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, HttpMethod method, ApiMessage? message) where TResponse : ApiMessage;
|
|
|
|
Task<ApiResponse<TResponse>> SendRequest<TResponse>(string route, HttpMethod method, ApiMessage? message, IApiMessageSerializer? serializer) where TResponse : ApiMessage;
|
|
}
|