-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathDmsBase.java
More file actions
59 lines (52 loc) · 1.85 KB
/
Copy pathDmsBase.java
File metadata and controls
59 lines (52 loc) · 1.85 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
package io.github.kloping.qqbot.http;
import io.github.kloping.qqbot.Starter;
import io.github.kloping.qqbot.entities.qqpd.Dms;
import io.github.kloping.qqbot.entities.qqpd.DmsRequest;
import io.github.kloping.qqbot.entities.qqpd.message.RawPreMessage;
import io.github.kloping.qqbot.http.data.ActionResult;
import io.github.kloping.spt.annotations.http.*;
import io.github.kloping.spt.entity.KeyVals;
import java.util.Map;
import static org.jsoup.Connection.Method.DELETE;
/**
* @author github.kloping
*/
@HttpClient(Starter.NET_POINT)
@Headers("io.github.kloping.qqbot.Start0.getHeaders")
public interface DmsBase {
/**
* send a Direct message
*
* @param gid
* @param body
* @param headers
* @return
*/
@PostPath("/dms/{guild_id}/messages")
@Callback("io.github.kloping.qqbot.http.data.ActionResult.doc")
ActionResult send(@PathValue("guild_id") String gid, @RequestBody(type = RequestBody.type.json) RawPreMessage body,
@Headers Map<String, String> headers);
@PostPath("/dms/{guild_id}/messages")
@Callback("io.github.kloping.qqbot.http.data.ActionResult.doc")
ActionResult send(@PathValue("guild_id") String gid, @Headers Map<String, String> headers, @RequestData KeyVals data);
/**
* create The session
*
* @param request
* @param header0
* @return
*/
@PostPath("/users/@me/dms")
Dms create(@RequestBody(type = RequestBody.type.json) DmsRequest request, @Headers Map<String, String> header0);
/**
* 撤回一条消息
*
* @param gid
* @param mid
* @param hidetip
* @return
*/
@RequestPath(method = DELETE, value = "/dms/{guild_id}/messages/{message_id}")
Object delete(@PathValue("guild_id") String gid,
@PathValue("message_id") String mid, @ParamName("hidetip") Boolean hidetip);
}