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

e.volc-sdk-java.1.0.185.source-code.GetAdvertisementDataAPI Maven / Gradle / Ivy

There is a newer version: 1.0.184
Show newest version
package com.volcengine.example.livesaas;

import com.alibaba.fastjson.JSON;
import com.volcengine.model.livesaas.request.GetAdvertisementDataAPIRequest;
import com.volcengine.model.livesaas.response.GetAdvertisementDataAPIResponse;
import com.volcengine.service.livesaas.LivesaasService;
import com.volcengine.service.livesaas.impl.LivesaasServiceImpl;

public class GetAdvertisementDataAPI {

    public static void main(String[] args) {
        LivesaasService livesaasService = LivesaasServiceImpl.getInstance();
        // call below method if you dont set ak and sk in ~/.volc/config

        livesaasService.setAccessKey("");
        livesaasService.setSecretKey("");
        // list users
        try {
            GetAdvertisementDataAPIRequest getAdvertisementDataAPIRequest = new GetAdvertisementDataAPIRequest();
            getAdvertisementDataAPIRequest.setActivityId(123456L);

            GetAdvertisementDataAPIResponse getAdvertisementDataAPIResponse = livesaasService.getAdvertisementDataAPI(getAdvertisementDataAPIRequest);
            System.out.println(JSON.toJSONString(getAdvertisementDataAPIResponse));
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy