com.bitmovin.api.sdk.encoding.inputs.zixi.customdata.CustomdataApi Maven / Gradle / Ivy
package com.bitmovin.api.sdk.encoding.inputs.zixi.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);
}
/**
* Zixi input Custom Data
*
* @param inputId Id of the input (required)
* @return CustomData
* @throws BitmovinException if fails to make API call
*/
public CustomData getCustomData(String inputId) throws BitmovinException {
try {
return this.apiClient.getCustomData(inputId).getData().getResult();
} catch (Exception ex) {
throw buildBitmovinException(ex);
}
}
interface CustomdataApiClient {
@RequestLine("GET /encoding/inputs/zixi/{input_id}/customData")
ResponseEnvelope getCustomData(@Param(value = "input_id") String inputId) throws BitmovinException;
}
}