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

com.konfigthis.newscatcherapi.client.api.SearchApiGenerated Maven / Gradle / Ivy

/*
 * NewsCatcher-V3 Production API
 *  

Visit our website https://newscatcherapi.com * * The version of the OpenAPI document: 3.2.16 * Contact: [email protected] * * NOTE: This class is auto generated by Konfig (https://konfigthis.com). * Do not edit the class manually. */ package com.konfigthis.newscatcherapi.client.api; import com.konfigthis.newscatcherapi.client.ApiCallback; import com.konfigthis.newscatcherapi.client.ApiClient; import com.konfigthis.newscatcherapi.client.ApiException; import com.konfigthis.newscatcherapi.client.ApiResponse; import com.konfigthis.newscatcherapi.client.Configuration; import com.konfigthis.newscatcherapi.client.Pair; import com.konfigthis.newscatcherapi.client.ProgressRequestBody; import com.konfigthis.newscatcherapi.client.ProgressResponseBody; import com.google.gson.reflect.TypeToken; import java.io.IOException; import com.konfigthis.newscatcherapi.client.model.CSearchResponse; import com.konfigthis.newscatcherapi.client.model.CSearchResponse1; import com.konfigthis.newscatcherapi.client.model.SearchRequest; import java.lang.reflect.Type; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.ws.rs.core.GenericType; public class SearchApiGenerated { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; public SearchApiGenerated() throws IllegalArgumentException { this(Configuration.getDefaultApiClient()); } public SearchApiGenerated(ApiClient apiClient) throws IllegalArgumentException { if (apiClient.getApiKey() == null) { throw new IllegalArgumentException("\"x-api-token\" is required but no API key was provided. Please set \"x-api-token\" with ApiClient#setApiKey(String)."); } this.localVarApiClient = apiClient; } public ApiClient getApiClient() { return localVarApiClient; } public void setApiClient(ApiClient apiClient) { this.localVarApiClient = apiClient; } public int getHostIndex() { return localHostIndex; } public void setHostIndex(int hostIndex) { this.localHostIndex = hostIndex; } public String getCustomBaseUrl() { return localCustomBaseUrl; } public void setCustomBaseUrl(String customBaseUrl) { this.localCustomBaseUrl = customBaseUrl; } private okhttp3.Call getCall(String q, String searchIn, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, Object notAuthorName, String from, String to, String publishedDatePrecision, Boolean byParseDate, String sortBy, Object rankedOnly, Integer fromRank, Integer toRank, Boolean isHeadline, Boolean isOpinion, Boolean isPaidContent, Object parentUrl, Object allLinks, Object allDomainLinks, Integer wordCountMin, Integer wordCountMax, Integer page, Integer pageSize, String clusteringVariable, Boolean clusteringEnabled, Double clusteringThreshold, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, String orGEntityName, String peREntityName, String loCEntityName, String miSCEntityName, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, Object sourceName, Object iabTags, Object notIabTags, Boolean excludeDuplicates, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = null; // create path and map variables String localVarPath = "/api/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); if (q != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("q", q)); } if (searchIn != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("search_in", searchIn)); } if (predefinedSources != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("predefined_sources", predefinedSources)); } if (sources != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sources", sources)); } if (notSources != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_sources", notSources)); } if (lang != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("lang", lang)); } if (notLang != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_lang", notLang)); } if (countries != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("countries", countries)); } if (notCountries != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_countries", notCountries)); } if (notAuthorName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_author_name", notAuthorName)); } if (from != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("from_", from)); } if (to != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("to_", to)); } if (publishedDatePrecision != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("published_date_precision", publishedDatePrecision)); } if (byParseDate != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("by_parse_date", byParseDate)); } if (sortBy != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("sort_by", sortBy)); } if (rankedOnly != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("ranked_only", rankedOnly)); } if (fromRank != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("from_rank", fromRank)); } if (toRank != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("to_rank", toRank)); } if (isHeadline != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("is_headline", isHeadline)); } if (isOpinion != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("is_opinion", isOpinion)); } if (isPaidContent != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("is_paid_content", isPaidContent)); } if (parentUrl != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("parent_url", parentUrl)); } if (allLinks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("all_links", allLinks)); } if (allDomainLinks != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("all_domain_links", allDomainLinks)); } if (wordCountMin != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("word_count_min", wordCountMin)); } if (wordCountMax != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("word_count_max", wordCountMax)); } if (page != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page", page)); } if (pageSize != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("page_size", pageSize)); } if (clusteringVariable != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("clustering_variable", clusteringVariable)); } if (clusteringEnabled != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("clustering_enabled", clusteringEnabled)); } if (clusteringThreshold != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("clustering_threshold", clusteringThreshold)); } if (includeNlpData != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_nlp_data", includeNlpData)); } if (hasNlp != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("has_nlp", hasNlp)); } if (theme != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("theme", theme)); } if (notTheme != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_theme", notTheme)); } if (orGEntityName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("ORG_entity_name", orGEntityName)); } if (peREntityName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("PER_entity_name", peREntityName)); } if (loCEntityName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("LOC_entity_name", loCEntityName)); } if (miSCEntityName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("MISC_entity_name", miSCEntityName)); } if (titleSentimentMin != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("title_sentiment_min", titleSentimentMin)); } if (titleSentimentMax != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("title_sentiment_max", titleSentimentMax)); } if (contentSentimentMin != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("content_sentiment_min", contentSentimentMin)); } if (contentSentimentMax != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("content_sentiment_max", contentSentimentMax)); } if (iptcTags != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("iptc_tags", iptcTags)); } if (notIptcTags != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_iptc_tags", notIptcTags)); } if (sourceName != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("source_name", sourceName)); } if (iabTags != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("iab_tags", iabTags)); } if (notIabTags != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("not_iab_tags", notIabTags)); } if (excludeDuplicates != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("exclude_duplicates", excludeDuplicates)); } final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "apiKey" }; return localVarApiClient.buildCall(basePath, localVarPath, "GET", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call getValidateBeforeCall(String q, String searchIn, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, Object notAuthorName, String from, String to, String publishedDatePrecision, Boolean byParseDate, String sortBy, Object rankedOnly, Integer fromRank, Integer toRank, Boolean isHeadline, Boolean isOpinion, Boolean isPaidContent, Object parentUrl, Object allLinks, Object allDomainLinks, Integer wordCountMin, Integer wordCountMax, Integer page, Integer pageSize, String clusteringVariable, Boolean clusteringEnabled, Double clusteringThreshold, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, String orGEntityName, String peREntityName, String loCEntityName, String miSCEntityName, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, Object sourceName, Object iabTags, Object notIabTags, Boolean excludeDuplicates, final ApiCallback _callback) throws ApiException { // verify the required parameter 'q' is set if (q == null) { throw new ApiException("Missing the required parameter 'q' when calling get(Async)"); } return getCall(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates, _callback); } private ApiResponse getWithHttpInfo(String q, String searchIn, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, Object notAuthorName, String from, String to, String publishedDatePrecision, Boolean byParseDate, String sortBy, Object rankedOnly, Integer fromRank, Integer toRank, Boolean isHeadline, Boolean isOpinion, Boolean isPaidContent, Object parentUrl, Object allLinks, Object allDomainLinks, Integer wordCountMin, Integer wordCountMax, Integer page, Integer pageSize, String clusteringVariable, Boolean clusteringEnabled, Double clusteringThreshold, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, String orGEntityName, String peREntityName, String loCEntityName, String miSCEntityName, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, Object sourceName, Object iabTags, Object notIabTags, Boolean excludeDuplicates) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAsync(String q, String searchIn, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, Object notAuthorName, String from, String to, String publishedDatePrecision, Boolean byParseDate, String sortBy, Object rankedOnly, Integer fromRank, Integer toRank, Boolean isHeadline, Boolean isOpinion, Boolean isPaidContent, Object parentUrl, Object allLinks, Object allDomainLinks, Integer wordCountMin, Integer wordCountMax, Integer page, Integer pageSize, String clusteringVariable, Boolean clusteringEnabled, Double clusteringThreshold, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, String orGEntityName, String peREntityName, String loCEntityName, String miSCEntityName, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, Object sourceName, Object iabTags, Object notIabTags, Boolean excludeDuplicates, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class GetRequestBuilderGenerated { final String q; String searchIn; Object predefinedSources; Object sources; Object notSources; Object lang; Object notLang; Object countries; Object notCountries; Object notAuthorName; String from; String to; String publishedDatePrecision; Boolean byParseDate; String sortBy; Object rankedOnly; Integer fromRank; Integer toRank; Boolean isHeadline; Boolean isOpinion; Boolean isPaidContent; Object parentUrl; Object allLinks; Object allDomainLinks; Integer wordCountMin; Integer wordCountMax; Integer page; Integer pageSize; String clusteringVariable; Boolean clusteringEnabled; Double clusteringThreshold; Boolean includeNlpData; Boolean hasNlp; String theme; String notTheme; String orGEntityName; String peREntityName; String loCEntityName; String miSCEntityName; Double titleSentimentMin; Double titleSentimentMax; Double contentSentimentMin; Double contentSentimentMax; Object iptcTags; Object notIptcTags; Object sourceName; Object iabTags; Object notIabTags; Boolean excludeDuplicates; public GetRequestBuilderGenerated(String q) { this.q = q; } /** * Set searchIn * @param searchIn (optional, default to title_content) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder searchIn(String searchIn) { this.searchIn = searchIn; return (SearchApi.GetRequestBuilder) this; } /** * Set predefinedSources * @param predefinedSources (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder predefinedSources(Object predefinedSources) { this.predefinedSources = predefinedSources; return (SearchApi.GetRequestBuilder) this; } /** * Set sources * @param sources (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder sources(Object sources) { this.sources = sources; return (SearchApi.GetRequestBuilder) this; } /** * Set notSources * @param notSources (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notSources(Object notSources) { this.notSources = notSources; return (SearchApi.GetRequestBuilder) this; } /** * Set lang * @param lang (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder lang(Object lang) { this.lang = lang; return (SearchApi.GetRequestBuilder) this; } /** * Set notLang * @param notLang (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notLang(Object notLang) { this.notLang = notLang; return (SearchApi.GetRequestBuilder) this; } /** * Set countries * @param countries (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder countries(Object countries) { this.countries = countries; return (SearchApi.GetRequestBuilder) this; } /** * Set notCountries * @param notCountries (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notCountries(Object notCountries) { this.notCountries = notCountries; return (SearchApi.GetRequestBuilder) this; } /** * Set notAuthorName * @param notAuthorName (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notAuthorName(Object notAuthorName) { this.notAuthorName = notAuthorName; return (SearchApi.GetRequestBuilder) this; } /** * Set from * @param from (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder from(String from) { this.from = from; return (SearchApi.GetRequestBuilder) this; } /** * Set to * @param to (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder to(String to) { this.to = to; return (SearchApi.GetRequestBuilder) this; } /** * Set publishedDatePrecision * @param publishedDatePrecision (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder publishedDatePrecision(String publishedDatePrecision) { this.publishedDatePrecision = publishedDatePrecision; return (SearchApi.GetRequestBuilder) this; } /** * Set byParseDate * @param byParseDate (optional, default to false) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder byParseDate(Boolean byParseDate) { this.byParseDate = byParseDate; return (SearchApi.GetRequestBuilder) this; } /** * Set sortBy * @param sortBy (optional, default to relevancy) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder sortBy(String sortBy) { this.sortBy = sortBy; return (SearchApi.GetRequestBuilder) this; } /** * Set rankedOnly * @param rankedOnly (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder rankedOnly(Object rankedOnly) { this.rankedOnly = rankedOnly; return (SearchApi.GetRequestBuilder) this; } /** * Set fromRank * @param fromRank (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder fromRank(Integer fromRank) { this.fromRank = fromRank; return (SearchApi.GetRequestBuilder) this; } /** * Set toRank * @param toRank (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder toRank(Integer toRank) { this.toRank = toRank; return (SearchApi.GetRequestBuilder) this; } /** * Set isHeadline * @param isHeadline (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder isHeadline(Boolean isHeadline) { this.isHeadline = isHeadline; return (SearchApi.GetRequestBuilder) this; } /** * Set isOpinion * @param isOpinion (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder isOpinion(Boolean isOpinion) { this.isOpinion = isOpinion; return (SearchApi.GetRequestBuilder) this; } /** * Set isPaidContent * @param isPaidContent (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder isPaidContent(Boolean isPaidContent) { this.isPaidContent = isPaidContent; return (SearchApi.GetRequestBuilder) this; } /** * Set parentUrl * @param parentUrl (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder parentUrl(Object parentUrl) { this.parentUrl = parentUrl; return (SearchApi.GetRequestBuilder) this; } /** * Set allLinks * @param allLinks (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder allLinks(Object allLinks) { this.allLinks = allLinks; return (SearchApi.GetRequestBuilder) this; } /** * Set allDomainLinks * @param allDomainLinks (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder allDomainLinks(Object allDomainLinks) { this.allDomainLinks = allDomainLinks; return (SearchApi.GetRequestBuilder) this; } /** * Set wordCountMin * @param wordCountMin (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder wordCountMin(Integer wordCountMin) { this.wordCountMin = wordCountMin; return (SearchApi.GetRequestBuilder) this; } /** * Set wordCountMax * @param wordCountMax (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder wordCountMax(Integer wordCountMax) { this.wordCountMax = wordCountMax; return (SearchApi.GetRequestBuilder) this; } /** * Set page * @param page (optional, default to 1) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder page(Integer page) { this.page = page; return (SearchApi.GetRequestBuilder) this; } /** * Set pageSize * @param pageSize (optional, default to 100) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder pageSize(Integer pageSize) { this.pageSize = pageSize; return (SearchApi.GetRequestBuilder) this; } /** * Set clusteringVariable * @param clusteringVariable (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder clusteringVariable(String clusteringVariable) { this.clusteringVariable = clusteringVariable; return (SearchApi.GetRequestBuilder) this; } /** * Set clusteringEnabled * @param clusteringEnabled (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder clusteringEnabled(Boolean clusteringEnabled) { this.clusteringEnabled = clusteringEnabled; return (SearchApi.GetRequestBuilder) this; } /** * Set clusteringThreshold * @param clusteringThreshold (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder clusteringThreshold(Double clusteringThreshold) { this.clusteringThreshold = clusteringThreshold; return (SearchApi.GetRequestBuilder) this; } /** * Set includeNlpData * @param includeNlpData (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder includeNlpData(Boolean includeNlpData) { this.includeNlpData = includeNlpData; return (SearchApi.GetRequestBuilder) this; } /** * Set hasNlp * @param hasNlp (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder hasNlp(Boolean hasNlp) { this.hasNlp = hasNlp; return (SearchApi.GetRequestBuilder) this; } /** * Set theme * @param theme (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder theme(String theme) { this.theme = theme; return (SearchApi.GetRequestBuilder) this; } /** * Set notTheme * @param notTheme (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notTheme(String notTheme) { this.notTheme = notTheme; return (SearchApi.GetRequestBuilder) this; } /** * Set orGEntityName * @param orGEntityName (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder orGEntityName(String orGEntityName) { this.orGEntityName = orGEntityName; return (SearchApi.GetRequestBuilder) this; } /** * Set peREntityName * @param peREntityName (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder peREntityName(String peREntityName) { this.peREntityName = peREntityName; return (SearchApi.GetRequestBuilder) this; } /** * Set loCEntityName * @param loCEntityName (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder loCEntityName(String loCEntityName) { this.loCEntityName = loCEntityName; return (SearchApi.GetRequestBuilder) this; } /** * Set miSCEntityName * @param miSCEntityName (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder miSCEntityName(String miSCEntityName) { this.miSCEntityName = miSCEntityName; return (SearchApi.GetRequestBuilder) this; } /** * Set titleSentimentMin * @param titleSentimentMin (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder titleSentimentMin(Double titleSentimentMin) { this.titleSentimentMin = titleSentimentMin; return (SearchApi.GetRequestBuilder) this; } /** * Set titleSentimentMax * @param titleSentimentMax (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder titleSentimentMax(Double titleSentimentMax) { this.titleSentimentMax = titleSentimentMax; return (SearchApi.GetRequestBuilder) this; } /** * Set contentSentimentMin * @param contentSentimentMin (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder contentSentimentMin(Double contentSentimentMin) { this.contentSentimentMin = contentSentimentMin; return (SearchApi.GetRequestBuilder) this; } /** * Set contentSentimentMax * @param contentSentimentMax (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder contentSentimentMax(Double contentSentimentMax) { this.contentSentimentMax = contentSentimentMax; return (SearchApi.GetRequestBuilder) this; } /** * Set iptcTags * @param iptcTags (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder iptcTags(Object iptcTags) { this.iptcTags = iptcTags; return (SearchApi.GetRequestBuilder) this; } /** * Set notIptcTags * @param notIptcTags (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notIptcTags(Object notIptcTags) { this.notIptcTags = notIptcTags; return (SearchApi.GetRequestBuilder) this; } /** * Set sourceName * @param sourceName (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder sourceName(Object sourceName) { this.sourceName = sourceName; return (SearchApi.GetRequestBuilder) this; } /** * Set iabTags * @param iabTags (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder iabTags(Object iabTags) { this.iabTags = iabTags; return (SearchApi.GetRequestBuilder) this; } /** * Set notIabTags * @param notIabTags (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder notIabTags(Object notIabTags) { this.notIabTags = notIabTags; return (SearchApi.GetRequestBuilder) this; } /** * Set excludeDuplicates * @param excludeDuplicates (optional) * @return SearchApi.GetRequestBuilder */ public SearchApi.GetRequestBuilder excludeDuplicates(Boolean excludeDuplicates) { this.excludeDuplicates = excludeDuplicates; return (SearchApi.GetRequestBuilder) this; } /** * Build call for get * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { return getCall(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates, _callback); } /** * Execute get request * @return CSearchResponse * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public CSearchResponse execute() throws ApiException { ApiResponse localVarResp = getWithHttpInfo(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates); return localVarResp.getResponseBody(); } /** * Execute get request with HTTP info returned * @return ApiResponse<CSearchResponse> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { return getWithHttpInfo(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates); } /** * Execute get request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { return getAsync(q, searchIn, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, notAuthorName, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, clusteringVariable, clusteringEnabled, clusteringThreshold, includeNlpData, hasNlp, theme, notTheme, orGEntityName, peREntityName, loCEntityName, miSCEntityName, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, sourceName, iabTags, notIabTags, excludeDuplicates, _callback); } } /** * [Get] Search For Articles Request * This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. * @param q (required) * @return GetRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public SearchApi.GetRequestBuilder get(String q) throws IllegalArgumentException { if (q == null) throw new IllegalArgumentException("\"q\" is required but got null"); return ((SearchApi) this).new GetRequestBuilder(q); } private okhttp3.Call postCall(SearchRequest searchRequest, final ApiCallback _callback) throws ApiException { String basePath = null; // Operation Servers String[] localBasePaths = new String[] { }; // Determine Base Path to Use if (localCustomBaseUrl != null){ basePath = localCustomBaseUrl; } else if ( localBasePaths.length > 0 ) { basePath = localBasePaths[localHostIndex]; } else { basePath = null; } Object localVarPostBody = searchRequest; // create path and map variables String localVarPath = "/api/search"; List localVarQueryParams = new ArrayList(); List localVarCollectionQueryParams = new ArrayList(); Map localVarHeaderParams = new HashMap(); Map localVarCookieParams = new HashMap(); Map localVarFormParams = new HashMap(); final String[] localVarAccepts = { "application/json" }; final String localVarAccept = localVarApiClient.selectHeaderAccept(localVarAccepts); if (localVarAccept != null) { localVarHeaderParams.put("Accept", localVarAccept); } final String[] localVarContentTypes = { "application/json" }; final String localVarContentType = localVarApiClient.selectHeaderContentType(localVarContentTypes); if (localVarContentType != null) { localVarHeaderParams.put("Content-Type", localVarContentType); } String[] localVarAuthNames = new String[] { "apiKey" }; return localVarApiClient.buildCall(basePath, localVarPath, "POST", localVarQueryParams, localVarCollectionQueryParams, localVarPostBody, localVarHeaderParams, localVarCookieParams, localVarFormParams, localVarAuthNames, _callback); } @SuppressWarnings("rawtypes") private okhttp3.Call postValidateBeforeCall(SearchRequest searchRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'searchRequest' is set if (searchRequest == null) { throw new ApiException("Missing the required parameter 'searchRequest' when calling post(Async)"); } return postCall(searchRequest, _callback); } private ApiResponse postWithHttpInfo(SearchRequest searchRequest) throws ApiException { okhttp3.Call localVarCall = postValidateBeforeCall(searchRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call postAsync(SearchRequest searchRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = postValidateBeforeCall(searchRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class PostRequestBuilderGenerated { final String q; String searchIn; Object predefinedSources; Object sources; Object notSources; Object lang; Object notLang; Object countries; Object notCountries; Object notAuthorName; String from; String to; String publishedDatePrecision; Boolean byParseDate; String sortBy; Object rankedOnly; Integer fromRank; Integer toRank; Boolean isHeadline; Boolean isOpinion; Boolean isPaidContent; Object parentUrl; Object allLinks; Object allDomainLinks; Integer wordCountMin; Integer wordCountMax; Integer page; Integer pageSize; String clusteringVariable; Boolean clusteringEnabled; Double clusteringThreshold; Boolean includeNlpData; Boolean hasNlp; String theme; String notTheme; String orGEntityName; String peREntityName; String loCEntityName; String miSCEntityName; Double titleSentimentMin; Double titleSentimentMax; Double contentSentimentMin; Double contentSentimentMax; Object iptcTags; Object notIptcTags; Object sourceName; Object iabTags; Object notIabTags; Boolean excludeDuplicates; public PostRequestBuilderGenerated(String q) { this.q = q; } /** * Set searchIn * @param searchIn (optional, default to title_content) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder searchIn(String searchIn) { this.searchIn = searchIn; return (SearchApi.PostRequestBuilder) this; } /** * Set predefinedSources * @param predefinedSources (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder predefinedSources(Object predefinedSources) { this.predefinedSources = predefinedSources; return (SearchApi.PostRequestBuilder) this; } /** * Set sources * @param sources (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder sources(Object sources) { this.sources = sources; return (SearchApi.PostRequestBuilder) this; } /** * Set notSources * @param notSources (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notSources(Object notSources) { this.notSources = notSources; return (SearchApi.PostRequestBuilder) this; } /** * Set lang * @param lang (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder lang(Object lang) { this.lang = lang; return (SearchApi.PostRequestBuilder) this; } /** * Set notLang * @param notLang (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notLang(Object notLang) { this.notLang = notLang; return (SearchApi.PostRequestBuilder) this; } /** * Set countries * @param countries (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder countries(Object countries) { this.countries = countries; return (SearchApi.PostRequestBuilder) this; } /** * Set notCountries * @param notCountries (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notCountries(Object notCountries) { this.notCountries = notCountries; return (SearchApi.PostRequestBuilder) this; } /** * Set notAuthorName * @param notAuthorName (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notAuthorName(Object notAuthorName) { this.notAuthorName = notAuthorName; return (SearchApi.PostRequestBuilder) this; } /** * Set from * @param from (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder from(String from) { this.from = from; return (SearchApi.PostRequestBuilder) this; } /** * Set to * @param to (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder to(String to) { this.to = to; return (SearchApi.PostRequestBuilder) this; } /** * Set publishedDatePrecision * @param publishedDatePrecision (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder publishedDatePrecision(String publishedDatePrecision) { this.publishedDatePrecision = publishedDatePrecision; return (SearchApi.PostRequestBuilder) this; } /** * Set byParseDate * @param byParseDate (optional, default to false) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder byParseDate(Boolean byParseDate) { this.byParseDate = byParseDate; return (SearchApi.PostRequestBuilder) this; } /** * Set sortBy * @param sortBy (optional, default to relevancy) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder sortBy(String sortBy) { this.sortBy = sortBy; return (SearchApi.PostRequestBuilder) this; } /** * Set rankedOnly * @param rankedOnly (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder rankedOnly(Object rankedOnly) { this.rankedOnly = rankedOnly; return (SearchApi.PostRequestBuilder) this; } /** * Set fromRank * @param fromRank (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder fromRank(Integer fromRank) { this.fromRank = fromRank; return (SearchApi.PostRequestBuilder) this; } /** * Set toRank * @param toRank (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder toRank(Integer toRank) { this.toRank = toRank; return (SearchApi.PostRequestBuilder) this; } /** * Set isHeadline * @param isHeadline (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder isHeadline(Boolean isHeadline) { this.isHeadline = isHeadline; return (SearchApi.PostRequestBuilder) this; } /** * Set isOpinion * @param isOpinion (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder isOpinion(Boolean isOpinion) { this.isOpinion = isOpinion; return (SearchApi.PostRequestBuilder) this; } /** * Set isPaidContent * @param isPaidContent (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder isPaidContent(Boolean isPaidContent) { this.isPaidContent = isPaidContent; return (SearchApi.PostRequestBuilder) this; } /** * Set parentUrl * @param parentUrl (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder parentUrl(Object parentUrl) { this.parentUrl = parentUrl; return (SearchApi.PostRequestBuilder) this; } /** * Set allLinks * @param allLinks (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder allLinks(Object allLinks) { this.allLinks = allLinks; return (SearchApi.PostRequestBuilder) this; } /** * Set allDomainLinks * @param allDomainLinks (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder allDomainLinks(Object allDomainLinks) { this.allDomainLinks = allDomainLinks; return (SearchApi.PostRequestBuilder) this; } /** * Set wordCountMin * @param wordCountMin (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder wordCountMin(Integer wordCountMin) { this.wordCountMin = wordCountMin; return (SearchApi.PostRequestBuilder) this; } /** * Set wordCountMax * @param wordCountMax (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder wordCountMax(Integer wordCountMax) { this.wordCountMax = wordCountMax; return (SearchApi.PostRequestBuilder) this; } /** * Set page * @param page (optional, default to 1) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder page(Integer page) { this.page = page; return (SearchApi.PostRequestBuilder) this; } /** * Set pageSize * @param pageSize (optional, default to 100) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder pageSize(Integer pageSize) { this.pageSize = pageSize; return (SearchApi.PostRequestBuilder) this; } /** * Set clusteringVariable * @param clusteringVariable (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder clusteringVariable(String clusteringVariable) { this.clusteringVariable = clusteringVariable; return (SearchApi.PostRequestBuilder) this; } /** * Set clusteringEnabled * @param clusteringEnabled (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder clusteringEnabled(Boolean clusteringEnabled) { this.clusteringEnabled = clusteringEnabled; return (SearchApi.PostRequestBuilder) this; } /** * Set clusteringThreshold * @param clusteringThreshold (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder clusteringThreshold(Double clusteringThreshold) { this.clusteringThreshold = clusteringThreshold; return (SearchApi.PostRequestBuilder) this; } /** * Set includeNlpData * @param includeNlpData (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder includeNlpData(Boolean includeNlpData) { this.includeNlpData = includeNlpData; return (SearchApi.PostRequestBuilder) this; } /** * Set hasNlp * @param hasNlp (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder hasNlp(Boolean hasNlp) { this.hasNlp = hasNlp; return (SearchApi.PostRequestBuilder) this; } /** * Set theme * @param theme (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder theme(String theme) { this.theme = theme; return (SearchApi.PostRequestBuilder) this; } /** * Set notTheme * @param notTheme (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notTheme(String notTheme) { this.notTheme = notTheme; return (SearchApi.PostRequestBuilder) this; } /** * Set orGEntityName * @param orGEntityName (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder orGEntityName(String orGEntityName) { this.orGEntityName = orGEntityName; return (SearchApi.PostRequestBuilder) this; } /** * Set peREntityName * @param peREntityName (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder peREntityName(String peREntityName) { this.peREntityName = peREntityName; return (SearchApi.PostRequestBuilder) this; } /** * Set loCEntityName * @param loCEntityName (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder loCEntityName(String loCEntityName) { this.loCEntityName = loCEntityName; return (SearchApi.PostRequestBuilder) this; } /** * Set miSCEntityName * @param miSCEntityName (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder miSCEntityName(String miSCEntityName) { this.miSCEntityName = miSCEntityName; return (SearchApi.PostRequestBuilder) this; } /** * Set titleSentimentMin * @param titleSentimentMin (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder titleSentimentMin(Double titleSentimentMin) { this.titleSentimentMin = titleSentimentMin; return (SearchApi.PostRequestBuilder) this; } /** * Set titleSentimentMax * @param titleSentimentMax (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder titleSentimentMax(Double titleSentimentMax) { this.titleSentimentMax = titleSentimentMax; return (SearchApi.PostRequestBuilder) this; } /** * Set contentSentimentMin * @param contentSentimentMin (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder contentSentimentMin(Double contentSentimentMin) { this.contentSentimentMin = contentSentimentMin; return (SearchApi.PostRequestBuilder) this; } /** * Set contentSentimentMax * @param contentSentimentMax (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder contentSentimentMax(Double contentSentimentMax) { this.contentSentimentMax = contentSentimentMax; return (SearchApi.PostRequestBuilder) this; } /** * Set iptcTags * @param iptcTags (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder iptcTags(Object iptcTags) { this.iptcTags = iptcTags; return (SearchApi.PostRequestBuilder) this; } /** * Set notIptcTags * @param notIptcTags (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notIptcTags(Object notIptcTags) { this.notIptcTags = notIptcTags; return (SearchApi.PostRequestBuilder) this; } /** * Set sourceName * @param sourceName (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder sourceName(Object sourceName) { this.sourceName = sourceName; return (SearchApi.PostRequestBuilder) this; } /** * Set iabTags * @param iabTags (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder iabTags(Object iabTags) { this.iabTags = iabTags; return (SearchApi.PostRequestBuilder) this; } /** * Set notIabTags * @param notIabTags (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder notIabTags(Object notIabTags) { this.notIabTags = notIabTags; return (SearchApi.PostRequestBuilder) this; } /** * Set excludeDuplicates * @param excludeDuplicates (optional) * @return SearchApi.PostRequestBuilder */ public SearchApi.PostRequestBuilder excludeDuplicates(Boolean excludeDuplicates) { this.excludeDuplicates = excludeDuplicates; return (SearchApi.PostRequestBuilder) this; } /** * Build call for post * @param _callback ApiCallback API callback * @return Call to execute * @throws ApiException If fail to serialize the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException { SearchRequest searchRequest = buildBodyParams(); return postCall(searchRequest, _callback); } private SearchRequest buildBodyParams() { SearchRequest searchRequest = new SearchRequest(); searchRequest.q(this.q); searchRequest.searchIn(this.searchIn); searchRequest.predefinedSources(this.predefinedSources); searchRequest.sources(this.sources); searchRequest.notSources(this.notSources); searchRequest.lang(this.lang); searchRequest.notLang(this.notLang); searchRequest.countries(this.countries); searchRequest.notCountries(this.notCountries); searchRequest.notAuthorName(this.notAuthorName); searchRequest.from(this.from); searchRequest.to(this.to); searchRequest.publishedDatePrecision(this.publishedDatePrecision); searchRequest.byParseDate(this.byParseDate); searchRequest.sortBy(this.sortBy); searchRequest.rankedOnly(this.rankedOnly); searchRequest.fromRank(this.fromRank); searchRequest.toRank(this.toRank); searchRequest.isHeadline(this.isHeadline); searchRequest.isOpinion(this.isOpinion); searchRequest.isPaidContent(this.isPaidContent); searchRequest.parentUrl(this.parentUrl); searchRequest.allLinks(this.allLinks); searchRequest.allDomainLinks(this.allDomainLinks); searchRequest.wordCountMin(this.wordCountMin); searchRequest.wordCountMax(this.wordCountMax); searchRequest.page(this.page); searchRequest.pageSize(this.pageSize); searchRequest.clusteringVariable(this.clusteringVariable); searchRequest.clusteringEnabled(this.clusteringEnabled); searchRequest.clusteringThreshold(this.clusteringThreshold); searchRequest.includeNlpData(this.includeNlpData); searchRequest.hasNlp(this.hasNlp); searchRequest.theme(this.theme); searchRequest.notTheme(this.notTheme); searchRequest.orGEntityName(this.orGEntityName); searchRequest.peREntityName(this.peREntityName); searchRequest.loCEntityName(this.loCEntityName); searchRequest.miSCEntityName(this.miSCEntityName); searchRequest.titleSentimentMin(this.titleSentimentMin); searchRequest.titleSentimentMax(this.titleSentimentMax); searchRequest.contentSentimentMin(this.contentSentimentMin); searchRequest.contentSentimentMax(this.contentSentimentMax); searchRequest.iptcTags(this.iptcTags); searchRequest.notIptcTags(this.notIptcTags); searchRequest.sourceName(this.sourceName); searchRequest.iabTags(this.iabTags); searchRequest.notIabTags(this.notIabTags); searchRequest.excludeDuplicates(this.excludeDuplicates); return searchRequest; } /** * Execute post request * @return CSearchResponse1 * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public CSearchResponse1 execute() throws ApiException { SearchRequest searchRequest = buildBodyParams(); ApiResponse localVarResp = postWithHttpInfo(searchRequest); return localVarResp.getResponseBody(); } /** * Execute post request with HTTP info returned * @return ApiResponse<CSearchResponse1> * @throws ApiException If fail to call the API, e.g. server error or cannot deserialize the response body * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public ApiResponse executeWithHttpInfo() throws ApiException { SearchRequest searchRequest = buildBodyParams(); return postWithHttpInfo(searchRequest); } /** * Execute post request (asynchronously) * @param _callback The callback to be executed when the API call finishes * @return The request call * @throws ApiException If fail to process the API call, e.g. serializing the request body object * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public okhttp3.Call executeAsync(final ApiCallback _callback) throws ApiException { SearchRequest searchRequest = buildBodyParams(); return postAsync(searchRequest, _callback); } } /** * [Post] Search For Articles Request * This endpoint allows you to search for articles. You can search for articles by keyword, language, country, source, and more. * @param searchRequest (required) * @return PostRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public SearchApi.PostRequestBuilder post(String q) throws IllegalArgumentException { if (q == null) throw new IllegalArgumentException("\"q\" is required but got null"); return ((SearchApi) this).new PostRequestBuilder(q); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy