-
Notifications
You must be signed in to change notification settings - Fork 1
/
ITopClient.cs
executable file
·38 lines (35 loc) · 1.36 KB
/
ITopClient.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
using System;
using Top.Api.Request;
namespace Top.Api
{
/// <summary>
/// TOP客户端。
/// </summary>
public interface ITopClient
{
/// <summary>
/// 执行TOP公开API请求。
/// </summary>
/// <typeparam name="T">领域对象</typeparam>
/// <param name="request">具体的TOP API请求</param>
/// <returns>领域对象</returns>
T Execute<T>(ITopRequest<T> request) where T : TopResponse;
/// <summary>
/// 执行TOP隐私API请求。
/// </summary>
/// <typeparam name="T">领域对象</typeparam>
/// <param name="request">具体的TOP API请求</param>
/// <param name="session">用户会话码</param>
/// <returns>领域对象</returns>
T Execute<T>(ITopRequest<T> request, string session) where T : TopResponse;
/// <summary>
/// 执行TOP隐私API请求。
/// </summary>
/// <typeparam name="T">领域对象</typeparam>
/// <param name="request">具体的TOP API请求</param>
/// <param name="session">用户会话码</param>
/// <param name="timestamp">请求时间戳</param>
/// <returns>领域对象</returns>
T Execute<T>(ITopRequest<T> request, string session, DateTime timestamp) where T : TopResponse;
}
}