mirror of
https://github.com/yanlongqi/jhinno-openapi-java-sdk.git
synced 2026-03-22 06:15:10 +08:00
使用文档完善
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.jhinno.sdk.openapi.api;
|
||||
|
||||
import cn.hutool.crypto.symmetric.AES;
|
||||
import cn.hutool.http.ContentType;
|
||||
import com.fasterxml.jackson.core.type.TypeReference;
|
||||
import com.jhinno.sdk.openapi.ArgsException;
|
||||
import com.jhinno.sdk.openapi.CommonConstant;
|
||||
@@ -143,14 +144,15 @@ public class JHApiExecution {
|
||||
/**
|
||||
* 构建一个带token的请求头
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param username 用户名
|
||||
* @param isContentType 是否携带默认的Content-type,默认为{@link ContentType#JSON}
|
||||
* @return 请求头
|
||||
*/
|
||||
protected Map<String, String> getHeaders(String username, boolean isContentType) {
|
||||
Map<String, String> headers = new HashMap<>();
|
||||
// 默认请求json数据
|
||||
if (isContentType) {
|
||||
headers.put("Content-type", "application/json");
|
||||
headers.put("Content-type", ContentType.JSON.getValue());
|
||||
}
|
||||
if (StringUtils.isBlank(username)) {
|
||||
return headers;
|
||||
|
||||
@@ -66,6 +66,7 @@ public class JHAppApiExecution extends JHApiExecution {
|
||||
* 注:开启密集后,仅能查看自己的会话和比自己密级低的会话
|
||||
* </p>
|
||||
*
|
||||
* @param username 用户名
|
||||
* @return 会话列表
|
||||
*/
|
||||
public List<SessionInfo> getDesktopList(String username) {
|
||||
@@ -223,6 +224,7 @@ public class JHAppApiExecution extends JHApiExecution {
|
||||
/**
|
||||
* 连接会话
|
||||
*
|
||||
* @param username 用户名
|
||||
* @param sessionId 会话拆
|
||||
* @return JHClient协议链接信息
|
||||
*/
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package com.jhinno.sdk.openapi.api.app;
|
||||
|
||||
import com.sun.java.swing.plaf.windows.resources.windows;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@@ -35,6 +35,7 @@ public class JHDataApiExecution extends JHApiExecution {
|
||||
/**
|
||||
* 根据用户scope查询数据目录列表
|
||||
*
|
||||
* @param username 用户名
|
||||
* @return 用户数据目录列表
|
||||
*/
|
||||
public List<SpoolerDataInfo> getSpoolersData(String username) {
|
||||
|
||||
Reference in New Issue
Block a user