Issues
邮箱
特别说明:非官方出版,纯属个人开发,欢迎MR
暂未发布至Maven中央仓库,可自行下载源码编译
<dependency>
<groupId>com.github.alien.sdk.wxrobot</groupId>
<artifactId>worktool-robot-sdk</artifactId>
<version>1.0.1</version>
</dependency>
// import ...
public class Test {
public static void main(String[] args) throws IOException {
WorktoolClient worktoolClient = new WorktoolClient("xxxxx");
}
}
// import ...
public class Test {
public static void main(String[] args) throws IOException {
WorktoolClient worktoolClient = new WorktoolClient("xxxxx");
testSendMsg(worktoolClient);
}
private static void testSendMsg(WorktoolClient worktoolClient) {
SendMessageCmdRequest sendMessageCmdRequest = new SendMessageCmdRequest();
List<SendMessageCmdRequest.Detail> list = new ArrayList<>();
SendMessageCmdRequest.Detail detail = new SendMessageCmdRequest.Detail();
detail.setTitleList("XX群","XX好友");
detail.setReceivedContent("hello world");
detail.setAtList(SendMessageCmdRequest.Detail.AT_ALL);
sendMessageCmdRequest.getList().add(detail);
BaseCmdWorktoolResponse callback = worktoolClient.callback(sendMessageCmdRequest);
System.out.println(JSON.toJSONString(sendMessageCmdRequest.getBody()));
System.out.println(JSON.toJSONString(callback));
}
}
// import ...
public class Test {
public static void main(String[] args) throws IOException {
WorktoolClient worktoolClient = new WorktoolClient("xxxxx");
testClearCmd(worktoolClient);
}
private static void testClearCmd(WorktoolClient worktoolClient) {
BaseCmdWorktoolResponse callback = worktoolClient.callback(new ClearCmdRequest());
System.out.println(JSON.toJSONString(new ClearCmdRequest()));
System.out.println(JSON.toJSONString(callback));
}
}
持续更新中... 具体调用方式,参考:
src/test/java/WorktoolTest.java