-
-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathUserBaseV2.java
More file actions
38 lines (34 loc) · 1.5 KB
/
Copy pathUserBaseV2.java
File metadata and controls
38 lines (34 loc) · 1.5 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
package io.github.kloping.qqbot.http;
import io.github.kloping.qqbot.Starter;
import io.github.kloping.qqbot.http.data.V2Result;
import io.github.kloping.spt.annotations.http.*;
import java.util.Map;
/**
* <table><tr><th colspan="2">基本</th></tr> <tr><td>HTTP URL</td> <td>/v2/groups/{group_openid}/messages</td></tr> <tr><td>HTTP Method</td> <td>POST</td></tr></table>
* <hr>
* <table><thead><tr><th><strong>属性</strong></th> <th><strong>类型</strong></th> <th><strong>必填</strong></th> <th><strong>说明</strong></th></tr></thead> <tbody><tr><td>group_openid</td> <td>string</td> <td>是</td> <td>群聊的 openid</td></tr></tbody></table>
*
* @author github.kloping
*/
@HttpClient(Starter.NET_POINT)
@Headers("io.github.kloping.qqbot.Start0.getHeaders")
public interface UserBaseV2 extends BaseV2 {
/**
* 发送私聊消息
* @param uid
* @param body
* @param headers
* @return msg
*/
@PostPath("/v2/users/{openid}/messages")
V2Result send(@PathValue("openid") String uid, @RequestBody(type = io.github.kloping.spt.annotations.http.RequestBody.type.json) String body, @Headers Map<String, String> headers);
/**
* 发送私聊媒体
* @param uid
* @param body
* @param headers
* @return 文件id
*/
@PostPath("/v2/users/{openid}/files")
V2Result sendFile(@PathValue("openid") String uid, @RequestBody(type = io.github.kloping.spt.annotations.http.RequestBody.type.json) String body, @Headers Map<String, String> headers);
}