All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.dingtalkwatt_1_0.Client Maven / Gradle / Ivy

There is a newer version: 2.1.67
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.dingtalkwatt_1_0;

import com.aliyun.tea.*;
import com.aliyun.dingtalkwatt_1_0.models.*;

public class Client extends com.aliyun.teaopenapi.Client {

    public Client(com.aliyun.teaopenapi.models.Config config) throws Exception {
        super(config);
        com.aliyun.gateway.dingtalk.Client gatewayClient = new com.aliyun.gateway.dingtalk.Client();
        this._spi = gatewayClient;
        this._signatureAlgorithm = "v2";
        this._endpointRule = "";
        if (com.aliyun.teautil.Common.empty(_endpoint)) {
            this._endpoint = "api.dingtalk.com";
        }

    }


    /**
     * summary : 
     * 

根据加密后的用户手机号检查该用户是否在某人群中

* * @param request CheckInCrowdsByMobileRequest * @param headers map * @param runtime runtime options for this request RuntimeOptions * @return CheckInCrowdsByMobileResponse */ public CheckInCrowdsByMobileResponse checkInCrowdsByMobileWithOptions(CheckInCrowdsByMobileRequest request, java.util.Map headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(request); java.util.Map query = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.crowdIds)) { query.put("crowdIds", request.crowdIds); } if (!com.aliyun.teautil.Common.isUnset(request.mobile)) { query.put("mobile", request.mobile); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", headers), new TeaPair("query", com.aliyun.openapiutil.Client.query(query)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "CheckInCrowdsByMobile"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/crowdIdentifications/query"), new TeaPair("method", "POST"), new TeaPair("authType", "Anonymous"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new CheckInCrowdsByMobileResponse()); } /** * summary : *

根据加密后的用户手机号检查该用户是否在某人群中

* * @param request CheckInCrowdsByMobileRequest * @return CheckInCrowdsByMobileResponse */ public CheckInCrowdsByMobileResponse checkInCrowdsByMobile(CheckInCrowdsByMobileRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); java.util.Map headers = new java.util.HashMap<>(); return this.checkInCrowdsByMobileWithOptions(request, headers, runtime); } /** * summary : *

消耗用户积分

* * @param tmpReq ConsumePointRequest * @param headers ConsumePointHeaders * @param runtime runtime options for this request RuntimeOptions * @return ConsumePointResponse */ public ConsumePointResponse consumePointWithOptions(ConsumePointRequest tmpReq, ConsumePointHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(tmpReq); ConsumePointShrinkRequest request = new ConsumePointShrinkRequest(); com.aliyun.openapiutil.Client.convert(tmpReq, request); if (!com.aliyun.teautil.Common.isUnset(tmpReq.body)) { request.bodyShrink = com.aliyun.openapiutil.Client.arrayToStringWithSpecifiedStyle(tmpReq.body, "body", "json"); } java.util.Map query = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.bodyShrink)) { query.put("body", request.bodyShrink); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("query", com.aliyun.openapiutil.Client.query(query)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "ConsumePoint"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/points/consume"), new TeaPair("method", "POST"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new ConsumePointResponse()); } /** * summary : *

消耗用户积分

* * @param request ConsumePointRequest * @return ConsumePointResponse */ public ConsumePointResponse consumePoint(ConsumePointRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); ConsumePointHeaders headers = new ConsumePointHeaders(); return this.consumePointWithOptions(request, headers, runtime); } /** * summary : *

发布钉钉投放任务(搜索穹顶、搜索发现、搜索关键字)

* * @param request CreateDeliveryPlanRequest * @param headers CreateDeliveryPlanHeaders * @param runtime runtime options for this request RuntimeOptions * @return CreateDeliveryPlanResponse */ public CreateDeliveryPlanResponse createDeliveryPlanWithOptions(CreateDeliveryPlanRequest request, CreateDeliveryPlanHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(request); java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.content)) { body.put("content", request.content); } if (!com.aliyun.teautil.Common.isUnset(request.endTime)) { body.put("endTime", request.endTime); } if (!com.aliyun.teautil.Common.isUnset(request.resId)) { body.put("resId", request.resId); } if (!com.aliyun.teautil.Common.isUnset(request.startTime)) { body.put("startTime", request.startTime); } if (!com.aliyun.teautil.Common.isUnset(request.userIdList)) { body.put("userIdList", request.userIdList); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "CreateDeliveryPlan"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/deliveryPlans/publish"), new TeaPair("method", "POST"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new CreateDeliveryPlanResponse()); } /** * summary : *

发布钉钉投放任务(搜索穹顶、搜索发现、搜索关键字)

* * @param request CreateDeliveryPlanRequest * @return CreateDeliveryPlanResponse */ public CreateDeliveryPlanResponse createDeliveryPlan(CreateDeliveryPlanRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); CreateDeliveryPlanHeaders headers = new CreateDeliveryPlanHeaders(); return this.createDeliveryPlanWithOptions(request, headers, runtime); } /** * summary : *

查询用户积分

* * @param request GetPointInfoRequest * @param headers GetPointInfoHeaders * @param runtime runtime options for this request RuntimeOptions * @return GetPointInfoResponse */ public GetPointInfoResponse getPointInfoWithOptions(GetPointInfoRequest request, GetPointInfoHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(request); java.util.Map query = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.pointPoolCode)) { query.put("pointPoolCode", request.pointPoolCode); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("query", com.aliyun.openapiutil.Client.query(query)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "GetPointInfo"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/points"), new TeaPair("method", "GET"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new GetPointInfoResponse()); } /** * summary : *

查询用户积分

* * @param request GetPointInfoRequest * @return GetPointInfoResponse */ public GetPointInfoResponse getPointInfo(GetPointInfoRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); GetPointInfoHeaders headers = new GetPointInfoHeaders(); return this.getPointInfoWithOptions(request, headers, runtime); } /** * summary : *

撤销用户单笔积分消耗

* * @param tmpReq RevertPointRequest * @param headers RevertPointHeaders * @param runtime runtime options for this request RuntimeOptions * @return RevertPointResponse */ public RevertPointResponse revertPointWithOptions(RevertPointRequest tmpReq, RevertPointHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(tmpReq); RevertPointShrinkRequest request = new RevertPointShrinkRequest(); com.aliyun.openapiutil.Client.convert(tmpReq, request); if (!com.aliyun.teautil.Common.isUnset(tmpReq.body)) { request.bodyShrink = com.aliyun.openapiutil.Client.arrayToStringWithSpecifiedStyle(tmpReq.body, "body", "json"); } java.util.Map query = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.bodyShrink)) { query.put("body", request.bodyShrink); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("query", com.aliyun.openapiutil.Client.query(query)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "RevertPoint"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/points/revert"), new TeaPair("method", "POST"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new RevertPointResponse()); } /** * summary : *

撤销用户单笔积分消耗

* * @param request RevertPointRequest * @return RevertPointResponse */ public RevertPointResponse revertPoint(RevertPointRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); RevertPointHeaders headers = new RevertPointHeaders(); return this.revertPointWithOptions(request, headers, runtime); } /** * summary : *

发送钉钉统一引导Banner

* * @param request SendBannerRequest * @param headers SendBannerHeaders * @param runtime runtime options for this request RuntimeOptions * @return SendBannerResponse */ public SendBannerResponse sendBannerWithOptions(SendBannerRequest request, SendBannerHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(request); java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.content)) { body.put("content", request.content); } if (!com.aliyun.teautil.Common.isUnset(request.endTime)) { body.put("endTime", request.endTime); } if (!com.aliyun.teautil.Common.isUnset(request.startTime)) { body.put("startTime", request.startTime); } if (!com.aliyun.teautil.Common.isUnset(request.userId)) { body.put("userId", request.userId); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "SendBanner"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/banners/send"), new TeaPair("method", "POST"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new SendBannerResponse()); } /** * summary : *

发送钉钉统一引导Banner

* * @param request SendBannerRequest * @return SendBannerResponse */ public SendBannerResponse sendBanner(SendBannerRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); SendBannerHeaders headers = new SendBannerHeaders(); return this.sendBannerWithOptions(request, headers, runtime); } /** * summary : *

发送钉钉首页弹窗

* * @param request SendPopupRequest * @param headers SendPopupHeaders * @param runtime runtime options for this request RuntimeOptions * @return SendPopupResponse */ public SendPopupResponse sendPopupWithOptions(SendPopupRequest request, SendPopupHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(request); java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.content)) { body.put("content", request.content); } if (!com.aliyun.teautil.Common.isUnset(request.endTime)) { body.put("endTime", request.endTime); } if (!com.aliyun.teautil.Common.isUnset(request.startTime)) { body.put("startTime", request.startTime); } if (!com.aliyun.teautil.Common.isUnset(request.userId)) { body.put("userId", request.userId); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "SendPopup"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/popups/send"), new TeaPair("method", "POST"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new SendPopupResponse()); } /** * summary : *

发送钉钉首页弹窗

* * @param request SendPopupRequest * @return SendPopupResponse */ public SendPopupResponse sendPopup(SendPopupRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); SendPopupHeaders headers = new SendPopupHeaders(); return this.sendPopupWithOptions(request, headers, runtime); } /** * summary : *

发送钉钉搜索底纹

* * @param request SendSearchShadeRequest * @param headers SendSearchShadeHeaders * @param runtime runtime options for this request RuntimeOptions * @return SendSearchShadeResponse */ public SendSearchShadeResponse sendSearchShadeWithOptions(SendSearchShadeRequest request, SendSearchShadeHeaders headers, com.aliyun.teautil.models.RuntimeOptions runtime) throws Exception { com.aliyun.teautil.Common.validateModel(request); java.util.Map body = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(request.content)) { body.put("content", request.content); } if (!com.aliyun.teautil.Common.isUnset(request.endTime)) { body.put("endTime", request.endTime); } if (!com.aliyun.teautil.Common.isUnset(request.startTime)) { body.put("startTime", request.startTime); } if (!com.aliyun.teautil.Common.isUnset(request.userId)) { body.put("userId", request.userId); } java.util.Map realHeaders = new java.util.HashMap<>(); if (!com.aliyun.teautil.Common.isUnset(headers.commonHeaders)) { realHeaders = headers.commonHeaders; } if (!com.aliyun.teautil.Common.isUnset(headers.xAcsDingtalkAccessToken)) { realHeaders.put("x-acs-dingtalk-access-token", com.aliyun.teautil.Common.toJSONString(headers.xAcsDingtalkAccessToken)); } com.aliyun.teaopenapi.models.OpenApiRequest req = com.aliyun.teaopenapi.models.OpenApiRequest.build(TeaConverter.buildMap( new TeaPair("headers", realHeaders), new TeaPair("body", com.aliyun.openapiutil.Client.parseToMap(body)) )); com.aliyun.teaopenapi.models.Params params = com.aliyun.teaopenapi.models.Params.build(TeaConverter.buildMap( new TeaPair("action", "SendSearchShade"), new TeaPair("version", "watt_1.0"), new TeaPair("protocol", "HTTP"), new TeaPair("pathname", "/v1.0/watt/searchShades/send"), new TeaPair("method", "POST"), new TeaPair("authType", "AK"), new TeaPair("style", "ROA"), new TeaPair("reqBodyType", "none"), new TeaPair("bodyType", "json") )); return TeaModel.toModel(this.execute(params, req, runtime), new SendSearchShadeResponse()); } /** * summary : *

发送钉钉搜索底纹

* * @param request SendSearchShadeRequest * @return SendSearchShadeResponse */ public SendSearchShadeResponse sendSearchShade(SendSearchShadeRequest request) throws Exception { com.aliyun.teautil.models.RuntimeOptions runtime = new com.aliyun.teautil.models.RuntimeOptions(); SendSearchShadeHeaders headers = new SendSearchShadeHeaders(); return this.sendSearchShadeWithOptions(request, headers, runtime); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy