/
GithubResponse.cs
51 lines (44 loc) · 1.18 KB
/
GithubResponse.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
using System;
namespace GithubSharp.Core
{
public interface IGithubResponse
{
int RateLimitLimit{ get; set; }
int RateLimitRemaining { get; set; }
string Response { get; set; }
string LinkNext { get; set; }
string LinkPrevious { get; set; }
string LinkFirst { get; set; }
string LinkLast { get; set; }
int? StatusCode {get;set;}
string StatusText {get;set;}
}
public interface IGithubResponseWithReturnType<TResultType> : IGithubResponse
where TResultType : class
{
TResultType Result { get; set; }
}
public class GithubResponse : IGithubResponse
{
public int RateLimitLimit{ get; set; }
public int RateLimitRemaining { get; set; }
public string Response { get; set; }
public string LinkNext { get; set; }
public string LinkPrevious { get; set; }
public string LinkFirst { get; set; }
public string LinkLast { get; set; }
public int? StatusCode {get;set;}
public string StatusText {get;set;}
}
public class GithubResponseWithReturnType<TResultType> : GithubResponse, IGithubResponseWithReturnType<TResultType>
where TResultType : class
{
public GithubResponseWithReturnType ()
{
}
public TResultType Result {
get;
set;
}
}
}