init
This commit is contained in:
commit
e124a47765
19374 changed files with 9806149 additions and 0 deletions
70
Kreta.Client/ClientBase/Interface/IClientBase.cs
Normal file
70
Kreta.Client/ClientBase/Interface/IClientBase.cs
Normal 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();
|
||||
}
|
||||
}
|
20
Kreta.Client/ClientBase/Interface/IRestResult.cs
Normal file
20
Kreta.Client/ClientBase/Interface/IRestResult.cs
Normal 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; }
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue