This commit is contained in:
skidoodle 2024-03-13 00:33:46 +01:00
commit e124a47765
19374 changed files with 9806149 additions and 0 deletions

View file

@ -0,0 +1,70 @@
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();
}
}

View file

@ -0,0 +1,20 @@
using System;
using System.Net;
namespace Kreta.Client.ClientBase.Interface
{
internal interface IRestResult
{
string Result { get; set; }
HttpStatusCode StatusCode { get; set; }
string StatusDescription { get; set; }
Exception Exception { get; set; }
string ErrorMessage { get; set; }
byte[] RawBytes { get; set; }
}
internal interface IRestResult<TResponse> : IRestResult
{
TResponse Result { get; set; }
}
}