mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-04 20:57:47 +08:00
🆕 【微信开放平台】增加申请开通直播的接口
This commit is contained in:
parent
bb65189fb8
commit
809ff15709
@ -267,6 +267,11 @@ public interface WxOpenMaService extends WxMaService {
|
|||||||
*/
|
*/
|
||||||
String API_GET_PREFETCH_DOMAIN = "https://api.weixin.qq.com/wxa/get_prefetchdnsdomain";
|
String API_GET_PREFETCH_DOMAIN = "https://api.weixin.qq.com/wxa/get_prefetchdnsdomain";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请开通直播
|
||||||
|
*/
|
||||||
|
String API_WX_APPLY_LIVE_INFO = "https://api.weixin.qq.com/wxa/business/applyliveinfo";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得小程序的域名配置信息
|
* 获得小程序的域名配置信息
|
||||||
*
|
*
|
||||||
@ -743,4 +748,12 @@ public interface WxOpenMaService extends WxMaService {
|
|||||||
*/
|
*/
|
||||||
WxOpenMaPrefetchDomainResult getPrefetchDomain() throws WxErrorException;
|
WxOpenMaPrefetchDomainResult getPrefetchDomain() throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 申请开通直播
|
||||||
|
* 文档地址:<a href="https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/live-player/applyLivelnfo.html">https://developers.weixin.qq.com/doc/oplatform/openApi/OpenApiDoc/miniprogram-management/live-player/applyLivelnfo.html</a>
|
||||||
|
* @return {@link WxOpenMaApplyLiveInfoResult}
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
|
WxOpenMaApplyLiveInfoResult applyLiveInfo() throws WxErrorException;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -459,4 +459,12 @@ public class WxOpenMaServiceImpl extends WxMaServiceImpl implements WxOpenMaServ
|
|||||||
String response = get(API_GET_PREFETCH_DOMAIN, null);
|
String response = get(API_GET_PREFETCH_DOMAIN, null);
|
||||||
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaPrefetchDomainResult.class);
|
return WxMaGsonBuilder.create().fromJson(response, WxOpenMaPrefetchDomainResult.class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxOpenMaApplyLiveInfoResult applyLiveInfo() throws WxErrorException {
|
||||||
|
JsonObject params = new JsonObject();
|
||||||
|
params.addProperty("action","apply");
|
||||||
|
String response = post(API_WX_APPLY_LIVE_INFO, GSON.toJson(params));
|
||||||
|
return WxMaGsonBuilder.create().fromJson(response,WxOpenMaApplyLiveInfoResult.class);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,18 @@
|
|||||||
|
package me.chanjar.weixin.open.bean.result;
|
||||||
|
|
||||||
|
import com.google.gson.annotations.SerializedName;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.EqualsAndHashCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author 清心
|
||||||
|
* created at 2022-10-04 16:11
|
||||||
|
*/
|
||||||
|
@EqualsAndHashCode(callSuper = true)
|
||||||
|
@Data
|
||||||
|
public class WxOpenMaApplyLiveInfoResult extends WxOpenResult{
|
||||||
|
|
||||||
|
@SerializedName("action")
|
||||||
|
private String action;
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user