com.bitmovin.api.sdk.encoding.outputs.s3.customdata.CustomdataApi Maven / Gradle / Ivy
package com.bitmovin.api.sdk.encoding.outputs.s3.customdata;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.HashMap;
import feign.Param;
import feign.QueryMap;
import feign.RequestLine;
import feign.Body;
import feign.Headers;
import com.bitmovin.api.sdk.model.*;
import com.bitmovin.api.sdk.common.BitmovinException;
import static com.bitmovin.api.sdk.common.BitmovinExceptionFactory.buildBitmovinException;
import com.bitmovin.api.sdk.common.BitmovinDateExpander;
import com.bitmovin.api.sdk.common.QueryMapWrapper;
import com.bitmovin.api.sdk.common.BitmovinApiBuilder;
import com.bitmovin.api.sdk.common.BitmovinApiClientFactory;
public class CustomdataApi {
private final CustomdataApiClient apiClient;
public CustomdataApi(BitmovinApiClientFactory clientFactory) {
if (clientFactory == null)
{
throw new IllegalArgumentException("Parameter 'clientFactory' may not be null.");
}
this.apiClient = clientFactory.createApiClient(CustomdataApiClient.class);
}
/**
* Fluent builder for creating an instance of CustomdataApi
*/
public static BitmovinApiBuilder builder() {
return new BitmovinApiBuilder<>(CustomdataApi.class);
}
/**
* S3 Output Custom Data
*
* @param outputId Id of the output (required)
* @return CustomData
* @throws BitmovinException if fails to make API call
*/
public CustomData getCustomData(String outputId) throws BitmovinException {
try {
return this.apiClient.getCustomData(outputId).getData().getResult();
} catch (Exception ex) {
throw buildBitmovinException(ex);
}
}
interface CustomdataApiClient {
@RequestLine("GET /encoding/outputs/s3/{output_id}/customData")
ResponseEnvelope getCustomData(@Param(value = "output_id") String outputId) throws BitmovinException;
}
}