kreta/Kreta.Client/ClientBase/Interface/IClientBase.cs
2024-03-13 00:33:46 +01:00

70 lines
2.9 KiB
C#

using System.Collections.Generic;
using System.Net.Cache;
using Kreta.Client.Jira.Model.Request;
namespace Kreta.Client.ClientBase.Interface
{
internal interface IClientBase
{
void CreateBasicAuthenticator(string username, string password);
IRestResult Delete(
string relativeUri,
Dictionary<string, string> headers = null,
Dictionary<string, string> parameters = null,
Dictionary<string, string> urlSegments = null,
Dictionary<string, string> queryStrings = null,
object body = null,
List<File> fileList = null,
RequestCacheLevel cachePolicyLevel = RequestCacheLevel.NoCacheNoStore);
IRestResult Get(
string relativeUri,
Dictionary<string, string> headers = null,
Dictionary<string, string> parameters = null,
Dictionary<string, string> urlSegments = null,
Dictionary<string, string> queryStrings = null,
RequestCacheLevel cachePolicyLevel = RequestCacheLevel.NoCacheNoStore,
int? requestTimeout = null);
IRestResult<TResponse> Get<TResponse>(
string relativeUri,
Dictionary<string, string> headers = null,
Dictionary<string, string> parameters = null,
Dictionary<string, string> urlSegments = null,
Dictionary<string, string> queryStrings = null,
RequestCacheLevel cachePolicyLevel = RequestCacheLevel.NoCacheNoStore,
int? requestTimeout = null)
where TResponse : new();
IRestResult Patch(
string relativeUri,
Dictionary<string, string> headers = null,
Dictionary<string, string> parameters = null,
Dictionary<string, string> urlSegments = null,
Dictionary<string, string> queryStrings = null,
object body = null,
RequestCacheLevel cachePolicyLevel = RequestCacheLevel.NoCacheNoStore);
IRestResult Post(
string relativeUri,
Dictionary<string, string> headers = null,
Dictionary<string, string> parameters = null,
Dictionary<string, string> urlSegments = null,
Dictionary<string, string> queryStrings = null,
object body = null,
List<File> fileList = null,
RequestCacheLevel cachePolicyLevel = RequestCacheLevel.NoCacheNoStore);
IRestResult<TResponse> Post<TResponse>(
string relativeUri,
Dictionary<string, string> headers = null,
Dictionary<string, string> parameters = null,
Dictionary<string, string> urlSegments = null,
Dictionary<string, string> queryStrings = null,
object body = null,
List<File> fileList = null,
RequestCacheLevel cachePolicyLevel = RequestCacheLevel.NoCacheNoStore)
where TResponse : new();
}
}