-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathITopRequest.cs
More file actions
56 lines (47 loc) · 1.61 KB
/
ITopRequest.cs
File metadata and controls
56 lines (47 loc) · 1.61 KB
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
51
52
53
54
55
56
using System;
using System.Collections.Generic;
namespace Top.Api
{
/// <summary>
/// TOP请求接口。
/// </summary>
public interface ITopRequest<out T> where T : TopResponse
{
/// <summary>
/// 获取TOP的API名称。
/// </summary>
string GetApiName();
/// <summary>
/// 获取被调用的目标AppKey
/// </summary>
string GetTargetAppKey();
/// <summary>
/// 获取所有的Key-Value形式的文本请求参数字典。
/// </summary>
IDictionary<string, string> GetParameters();
/// <summary>
/// 获取自定义HTTP请求头参数。
/// </summary>
IDictionary<string, string> GetHeaderParameters();
/// <summary>
/// 获取API请求的用户授权码,仅用于批量API调用请求。
/// </summary>
string GetBatchApiSession();
/// <summary>
/// 设置API请求的用户授权码,仅用于批量API调用请求。
/// </summary>
void SetBatchApiSession(string session);
/// <summary>
/// 获取API在批量调用中的顺序,仅用于批量API调用请求。
/// </summary>
int GetBatchApiOrder();
/// <summary>
/// 设置API在批量调用中的顺序,仅用于批量API调用请求。
/// </summary>
void SetBatchApiOrder(int order);
/// <summary>
/// 客户端参数检查,减少服务端无效调用。
/// </summary>
void Validate();
}
}