public abstract class FeishuApiClient extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static String |
BASE_URL |
protected FeishuClient |
feishuClient |
protected com.google.gson.Gson |
gson |
protected okhttp3.OkHttpClient |
httpClient |
protected static okhttp3.MediaType |
JSON_MEDIA_TYPE |
| 构造器和说明 |
|---|
FeishuApiClient(FeishuClient feishuClient)
构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected okhttp3.Request.Builder |
createAuthenticatedRequest(String url,
String method,
okhttp3.RequestBody body)
构建带认证的请求
|
protected <T> T |
executeRequest(okhttp3.Request request,
Class<T> responseClass)
执行请求并处理响应
|
protected String |
getTenantAccessToken()
获取租户访问令牌
|
protected final FeishuClient feishuClient
protected final okhttp3.OkHttpClient httpClient
protected final com.google.gson.Gson gson
protected static final okhttp3.MediaType JSON_MEDIA_TYPE
public FeishuApiClient(FeishuClient feishuClient)
feishuClient - 飞书客户端protected String getTenantAccessToken() throws IOException
IOException - 请求异常protected okhttp3.Request.Builder createAuthenticatedRequest(String url, String method, okhttp3.RequestBody body) throws IOException
url - 请求URLmethod - HTTP方法body - 请求体IOException - 认证异常protected <T> T executeRequest(okhttp3.Request request,
Class<T> responseClass)
throws IOException
T - 响应类型request - 请求对象responseClass - 响应类型IOException - 请求异常Copyright © 2025. All rights reserved.