package com.willalp.common.uniapp;


import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

/**
 * @program: dashen-api
 * @description 个推配置
 * @author: hs
 * @create: 2022-04-11 17:46
 **/
@Configuration
public class UinAppPushConfig {

    @Value("${uniapp.push.baseUrl}")
    private String baseUrl;

    @Value("${uniapp.push.appId}")
    private String appId;

    @Value("${uniapp.push.appKey}")
    private String appKey;

    @Value("${uniapp.push.appSecret}")
    private String appSecret;

    @Value("${uniapp.push.masterSecret}")
    private String masterSecret;

//    @Bean(name = "myPushApi")
//    public PushApi pushApi() {
//        GtApiConfiguration apiConfiguration = new GtApiConfiguration();
//        //填写应用配置
//        apiConfiguration.setAppId(appId);
//        apiConfiguration.setAppKey(appKey);
//        apiConfiguration.setMasterSecret(masterSecret);
//        // 接口调用前缀，请查看文档: 接口调用规范 -> 接口前缀, 可不填写appId
//        apiConfiguration.setDomain(baseUrl);
//        // 实例化ApiHelper对象，用于创建接口对象
//        ApiHelper apiHelper = ApiHelper.build(apiConfiguration);
//        // 创建对象，建议复用。目前有PushApi、StatisticApi、UserApi
//        PushApi pushApi = apiHelper.creatApi(PushApi.class);
//        return pushApi;
//    }
}

