-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathChannelBase.java
More file actions
98 lines (86 loc) · 2.72 KB
/
Copy pathChannelBase.java
File metadata and controls
98 lines (86 loc) · 2.72 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
package io.github.kloping.qqbot.http;
import io.github.kloping.qqbot.Starter;
import io.github.kloping.qqbot.entities.qqpd.Channel;
import io.github.kloping.qqbot.entities.qqpd.PinsMessage;
import io.github.kloping.qqbot.entities.qqpd.message.MessagePack;
import io.github.kloping.spt.annotations.http.*;
import org.jsoup.Connection;
/**
* @author github.kloping
*/
@HttpClient(Starter.NET_POINT)
@Headers("io.github.kloping.qqbot.Start0.getHeaders")
public interface ChannelBase {
/**
* 获取子频道详情
*
* @param cid
* @return
*/
@GetPath("/channels/{channel_id}")
Channel getChannel(@PathValue("channel_id") String cid);
/**
* 获取指定消息
*
* @param cid
* @param mid
* @return
*/
@GetPath("/channels/{channel_id}/messages/{message_id}")
MessagePack getMessageById(@PathValue("channel_id") String cid, @PathValue("message_id") String mid);
/**
* 添加一个emoji
*
* @param cid
* @param mid
* @param type
* @param id
* @return
*/
@RequestPath(method = Connection.Method.PUT, value = "/channels/{channel_id}/messages/{message_id}/reactions/{type}/{id}")
void addEmoji(@PathValue("channel_id") String cid, @PathValue("message_id") String mid, @PathValue("type") Integer type, @PathValue("id") String id);
/**
* 移除一个emoji
*
* @param cid
* @param mid
* @param type
* @param id
* @return
*/
@RequestPath(method = Connection.Method.DELETE, value = "/channels/{channel_id}/messages/{message_id}/reactions/{type}/{id}")
void removeEmoji(@PathValue("channel_id") String cid, @PathValue("message_id") String mid, @PathValue("type") Integer type, @PathValue("id") String id);
/**
* 添加至精华消息
*
* @param cid
* @param mid
* @return
*/
@RequestPath(method = Connection.Method.PUT, value = "/channels/{channel_id}/pins/{message_id}")
String addPins(@PathValue("channel_id") String cid, @PathValue("message_id") String mid);
/**
* 移除精华消息
*
* @param cid
* @param mid all 为全部
* @return
*/
@RequestPath(method = Connection.Method.DELETE, value = "/channels/{channel_id}/pins/{message_id}")
PinsMessage deletePins(@PathValue("channel_id") String cid, @PathValue("message_id") String mid);
/**
* 获取精华消息
*
* @param cid
* @return
*/
@GetPath("/channels/{channel_id}/pins")
PinsMessage getPins(@PathValue("channel_id") String cid);
/**
* 删除
*
* @param cid
*/
@RequestPath(value = "/channels/{channel_id}", method = Connection.Method.DELETE)
void delete(@PathValue("channel_id") String cid);
}