// TODO: This endpoint supports POST if the query String is too long
public void GetLiveTvProgramsAsync(ProgramQuery query, final Response<ItemsResult> response)
    {
        if (query == null)
        {
            throw new IllegalArgumentException("query");
        }
        QueryStringDictionary dict = new QueryStringDictionary ();
        String isoDateFormat = "o";
        if (query.getMaxEndDate() != null)
        {
            dict.Add("MaxEndDate", getIsoString(query.getMaxEndDate()));
        }
        if (query.getMaxStartDate() != null)
        {
            dict.Add("MaxStartDate", getIsoString(query.getMaxStartDate()));
        }
        if (query.getMinEndDate() != null)
        {
            dict.Add("MinEndDate", getIsoString(query.getMinEndDate()));
        }
        if (query.getMinStartDate() != null)
        {
            dict.Add("MinStartDate", getIsoString(query.getMinStartDate()));
        }
        if (!query.getEnableTotalRecordCount())
        {
            dict.Add("EnableTotalRecordCount", "false");
        }
        dict.AddIfNotNull("EnableImages", query.getEnableImages());
        dict.AddIfNotNull("ImageTypeLimit", query.getImageTypeLimit());
        dict.AddIfNotNull("EnableImageTypes", query.getEnableImageTypes());
        dict.AddIfNotNull("Fields", query.getFields());
        dict.AddIfNotNull("SortBy", query.getSortBy());
        dict.AddIfNotNullOrEmpty("UserId", query.getUserId());
        if (query.getChannelIds() != null)
        {
            dict.Add("ChannelIds", tangible.DotNetToJavaStringHelper.join(",", query.getChannelIds()));
        }
        // TODO: This endpoint supports POST if the query String is too long
        String url = GetApiUrl("LiveTv/Programs", dict);
        url = AddDataFormat(url);
        Send(url, "GET", new SerializedResponse<>(response, jsonSerializer, ItemsResult.class));
    }
dict.Add("ChannelIds", tangible.DotNetToJavaStringHelper.join(",", query.getChannelIds()));
}
// TODO: This endpoint supports POST if the query String is too long
String url = GetApiUrl("LiveTv/Programs", dict);
url = AddDataFormat(url);
dict.AddIfNotNull("EnableImages", query.getEnableImages());
dict.AddIfNotNull("ImageTypeLimit", query.getImageTypeLimit());
dict.AddIfNotNull("EnableImageTypes", query.getEnableImageTypes());
dict.AddIfNotNull("Fields", query.getFields());
dict.AddIfNotNull("SortBy", query.getSortBy());
dict.AddIfNotNullOrEmpty("UserId", query.getUserId());
if (query.getChannelIds() != null)
{
dict.Add("ChannelIds", tangible.DotNetToJavaStringHelper.join(",", query.getChannelIds()));
}
// TODO: This endpoint supports POST if the query String is too long
String url = GetApiUrl("LiveTv/Programs", dict);
url = AddDataFormat(url);
Send(url, "GET", new SerializedResponse<>(response, jsonSerializer, ItemsResult.class));
}
dict.Add("MinEndDate", getIsoString(query.getMinEndDate()));
}
if (query.getMinStartDate() != null)
{
dict.Add("MinStartDate", getIsoString(query.getMinStartDate()));
}
if (!query.getEnableTotalRecordCount())
{
dict.Add("EnableTotalRecordCount", "false");
}
dict.AddIfNotNull("EnableImages", query.getEnableImages());
dict.AddIfNotNull("ImageTypeLimit", query.getImageTypeLimit());
dict.AddIfNotNull("EnableImageTypes", query.getEnableImageTypes());
dict.AddIfNotNull("Fields", query.getFields());
dict.AddIfNotNull("SortBy", query.getSortBy());
dict.AddIfNotNullOrEmpty("UserId", query.getUserId());
if (query.getChannelIds() != null)
{
dict.Add("ChannelIds", tangible.DotNetToJavaStringHelper.join(",", query.getChannelIds()));
}
// TODO: This endpoint supports POST if the query String is too long
String url = GetApiUrl("LiveTv/Programs", dict);
url = AddDataFormat(url);
Send(url, "GET", new SerializedResponse<>(response, jsonSerializer, ItemsResult.class));
}