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

com.konfigthis.newscatcherapi.client.api.SearchSimilarApiGenerated 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.FSearchResponse2; import com.konfigthis.newscatcherapi.client.model.FSearchResponse3; import com.konfigthis.newscatcherapi.client.model.MoreLikeThisRequest; 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 SearchSimilarApiGenerated { private ApiClient localVarApiClient; private int localHostIndex; private String localCustomBaseUrl; public SearchSimilarApiGenerated() throws IllegalArgumentException { this(Configuration.getDefaultApiClient()); } public SearchSimilarApiGenerated(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, Boolean includeSimilarDocuments, Integer similarDocumentsNumber, String similarDocumentsFields, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, String from, String to, Boolean byParseDate, String publishedDatePrecision, 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, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, 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_similar"; 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 (includeSimilarDocuments != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("include_similar_documents", includeSimilarDocuments)); } if (similarDocumentsNumber != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("similar_documents_number", similarDocumentsNumber)); } if (similarDocumentsFields != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("similar_documents_fields", similarDocumentsFields)); } 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 (from != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("from_", from)); } if (to != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("to_", to)); } if (byParseDate != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("by_parse_date", byParseDate)); } if (publishedDatePrecision != null) { localVarQueryParams.addAll(localVarApiClient.parameterToPair("published_date_precision", publishedDatePrecision)); } 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 (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 (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)); } 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, Boolean includeSimilarDocuments, Integer similarDocumentsNumber, String similarDocumentsFields, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, String from, String to, Boolean byParseDate, String publishedDatePrecision, 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, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, 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, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, _callback); } private ApiResponse getWithHttpInfo(String q, String searchIn, Boolean includeSimilarDocuments, Integer similarDocumentsNumber, String similarDocumentsFields, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, String from, String to, Boolean byParseDate, String publishedDatePrecision, 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, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(q, searchIn, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call getAsync(String q, String searchIn, Boolean includeSimilarDocuments, Integer similarDocumentsNumber, String similarDocumentsFields, Object predefinedSources, Object sources, Object notSources, Object lang, Object notLang, Object countries, Object notCountries, String from, String to, Boolean byParseDate, String publishedDatePrecision, 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, Boolean includeNlpData, Boolean hasNlp, String theme, String notTheme, Double titleSentimentMin, Double titleSentimentMax, Double contentSentimentMin, Double contentSentimentMax, Object iptcTags, Object notIptcTags, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = getValidateBeforeCall(q, searchIn, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class GetRequestBuilderGenerated { final String q; String searchIn; Boolean includeSimilarDocuments; Integer similarDocumentsNumber; String similarDocumentsFields; Object predefinedSources; Object sources; Object notSources; Object lang; Object notLang; Object countries; Object notCountries; String from; String to; Boolean byParseDate; String publishedDatePrecision; 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; Boolean includeNlpData; Boolean hasNlp; String theme; String notTheme; Double titleSentimentMin; Double titleSentimentMax; Double contentSentimentMin; Double contentSentimentMax; Object iptcTags; Object notIptcTags; public GetRequestBuilderGenerated(String q) { this.q = q; } /** * Set searchIn * @param searchIn (optional, default to title_content) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder searchIn(String searchIn) { this.searchIn = searchIn; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set includeSimilarDocuments * @param includeSimilarDocuments (optional, default to false) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder includeSimilarDocuments(Boolean includeSimilarDocuments) { this.includeSimilarDocuments = includeSimilarDocuments; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set similarDocumentsNumber * @param similarDocumentsNumber (optional, default to 5) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder similarDocumentsNumber(Integer similarDocumentsNumber) { this.similarDocumentsNumber = similarDocumentsNumber; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set similarDocumentsFields * @param similarDocumentsFields (optional, default to title,content) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder similarDocumentsFields(String similarDocumentsFields) { this.similarDocumentsFields = similarDocumentsFields; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set predefinedSources * @param predefinedSources (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder predefinedSources(Object predefinedSources) { this.predefinedSources = predefinedSources; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set sources * @param sources (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder sources(Object sources) { this.sources = sources; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set notSources * @param notSources (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder notSources(Object notSources) { this.notSources = notSources; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set lang * @param lang (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder lang(Object lang) { this.lang = lang; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set notLang * @param notLang (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder notLang(Object notLang) { this.notLang = notLang; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set countries * @param countries (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder countries(Object countries) { this.countries = countries; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set notCountries * @param notCountries (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder notCountries(Object notCountries) { this.notCountries = notCountries; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set from * @param from (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder from(String from) { this.from = from; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set to * @param to (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder to(String to) { this.to = to; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set byParseDate * @param byParseDate (optional, default to false) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder byParseDate(Boolean byParseDate) { this.byParseDate = byParseDate; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set publishedDatePrecision * @param publishedDatePrecision (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder publishedDatePrecision(String publishedDatePrecision) { this.publishedDatePrecision = publishedDatePrecision; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set sortBy * @param sortBy (optional, default to relevancy) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder sortBy(String sortBy) { this.sortBy = sortBy; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set rankedOnly * @param rankedOnly (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder rankedOnly(Object rankedOnly) { this.rankedOnly = rankedOnly; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set fromRank * @param fromRank (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder fromRank(Integer fromRank) { this.fromRank = fromRank; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set toRank * @param toRank (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder toRank(Integer toRank) { this.toRank = toRank; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set isHeadline * @param isHeadline (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder isHeadline(Boolean isHeadline) { this.isHeadline = isHeadline; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set isOpinion * @param isOpinion (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder isOpinion(Boolean isOpinion) { this.isOpinion = isOpinion; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set isPaidContent * @param isPaidContent (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder isPaidContent(Boolean isPaidContent) { this.isPaidContent = isPaidContent; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set parentUrl * @param parentUrl (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder parentUrl(Object parentUrl) { this.parentUrl = parentUrl; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set allLinks * @param allLinks (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder allLinks(Object allLinks) { this.allLinks = allLinks; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set allDomainLinks * @param allDomainLinks (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder allDomainLinks(Object allDomainLinks) { this.allDomainLinks = allDomainLinks; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set wordCountMin * @param wordCountMin (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder wordCountMin(Integer wordCountMin) { this.wordCountMin = wordCountMin; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set wordCountMax * @param wordCountMax (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder wordCountMax(Integer wordCountMax) { this.wordCountMax = wordCountMax; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set page * @param page (optional, default to 1) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder page(Integer page) { this.page = page; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set pageSize * @param pageSize (optional, default to 100) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder pageSize(Integer pageSize) { this.pageSize = pageSize; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set includeNlpData * @param includeNlpData (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder includeNlpData(Boolean includeNlpData) { this.includeNlpData = includeNlpData; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set hasNlp * @param hasNlp (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder hasNlp(Boolean hasNlp) { this.hasNlp = hasNlp; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set theme * @param theme (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder theme(String theme) { this.theme = theme; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set notTheme * @param notTheme (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder notTheme(String notTheme) { this.notTheme = notTheme; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set titleSentimentMin * @param titleSentimentMin (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder titleSentimentMin(Double titleSentimentMin) { this.titleSentimentMin = titleSentimentMin; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set titleSentimentMax * @param titleSentimentMax (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder titleSentimentMax(Double titleSentimentMax) { this.titleSentimentMax = titleSentimentMax; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set contentSentimentMin * @param contentSentimentMin (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder contentSentimentMin(Double contentSentimentMin) { this.contentSentimentMin = contentSentimentMin; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set contentSentimentMax * @param contentSentimentMax (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder contentSentimentMax(Double contentSentimentMax) { this.contentSentimentMax = contentSentimentMax; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set iptcTags * @param iptcTags (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder iptcTags(Object iptcTags) { this.iptcTags = iptcTags; return (SearchSimilarApi.GetRequestBuilder) this; } /** * Set notIptcTags * @param notIptcTags (optional) * @return SearchSimilarApi.GetRequestBuilder */ public SearchSimilarApi.GetRequestBuilder notIptcTags(Object notIptcTags) { this.notIptcTags = notIptcTags; return (SearchSimilarApi.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, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, _callback); } /** * Execute get request * @return FSearchResponse2 * @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 FSearchResponse2 execute() throws ApiException { ApiResponse localVarResp = getWithHttpInfo(q, searchIn, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags); return localVarResp.getResponseBody(); } /** * Execute get request with HTTP info returned * @return ApiResponse<FSearchResponse2> * @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, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags); } /** * 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, includeSimilarDocuments, similarDocumentsNumber, similarDocumentsFields, predefinedSources, sources, notSources, lang, notLang, countries, notCountries, from, to, byParseDate, publishedDatePrecision, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, _callback); } } /** * [Get] Search For Similar Articles Request * This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. * @param q (required) * @return GetRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public SearchSimilarApi.GetRequestBuilder get(String q) throws IllegalArgumentException { if (q == null) throw new IllegalArgumentException("\"q\" is required but got null"); return ((SearchSimilarApi) this).new GetRequestBuilder(q); } private okhttp3.Call postCall(MoreLikeThisRequest moreLikeThisRequest, 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 = moreLikeThisRequest; // create path and map variables String localVarPath = "/api/search_similar"; 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(MoreLikeThisRequest moreLikeThisRequest, final ApiCallback _callback) throws ApiException { // verify the required parameter 'moreLikeThisRequest' is set if (moreLikeThisRequest == null) { throw new ApiException("Missing the required parameter 'moreLikeThisRequest' when calling post(Async)"); } return postCall(moreLikeThisRequest, _callback); } private ApiResponse postWithHttpInfo(MoreLikeThisRequest moreLikeThisRequest) throws ApiException { okhttp3.Call localVarCall = postValidateBeforeCall(moreLikeThisRequest, null); Type localVarReturnType = new TypeToken(){}.getType(); return localVarApiClient.execute(localVarCall, localVarReturnType); } private okhttp3.Call postAsync(MoreLikeThisRequest moreLikeThisRequest, final ApiCallback _callback) throws ApiException { okhttp3.Call localVarCall = postValidateBeforeCall(moreLikeThisRequest, _callback); Type localVarReturnType = new TypeToken(){}.getType(); localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback); return localVarCall; } public abstract class PostRequestBuilderGenerated { final String q; String searchIn; Boolean includeSimilarDocuments; Integer similarDocumentsNumber; String similarDocumentsFields; Object predefinedSources; Object sources; Object notSources; Object lang; Object notLang; Object countries; Object notCountries; String from; String to; Boolean byParseDate; String publishedDatePrecision; 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; Boolean includeNlpData; Boolean hasNlp; String theme; String notTheme; Double titleSentimentMin; Double titleSentimentMax; Double contentSentimentMin; Double contentSentimentMax; Object iptcTags; Object notIptcTags; public PostRequestBuilderGenerated(String q) { this.q = q; } /** * Set searchIn * @param searchIn (optional, default to title_content) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder searchIn(String searchIn) { this.searchIn = searchIn; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set includeSimilarDocuments * @param includeSimilarDocuments (optional, default to false) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder includeSimilarDocuments(Boolean includeSimilarDocuments) { this.includeSimilarDocuments = includeSimilarDocuments; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set similarDocumentsNumber * @param similarDocumentsNumber (optional, default to 5) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder similarDocumentsNumber(Integer similarDocumentsNumber) { this.similarDocumentsNumber = similarDocumentsNumber; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set similarDocumentsFields * @param similarDocumentsFields (optional, default to title,content) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder similarDocumentsFields(String similarDocumentsFields) { this.similarDocumentsFields = similarDocumentsFields; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set predefinedSources * @param predefinedSources (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder predefinedSources(Object predefinedSources) { this.predefinedSources = predefinedSources; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set sources * @param sources (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder sources(Object sources) { this.sources = sources; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set notSources * @param notSources (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder notSources(Object notSources) { this.notSources = notSources; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set lang * @param lang (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder lang(Object lang) { this.lang = lang; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set notLang * @param notLang (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder notLang(Object notLang) { this.notLang = notLang; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set countries * @param countries (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder countries(Object countries) { this.countries = countries; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set notCountries * @param notCountries (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder notCountries(Object notCountries) { this.notCountries = notCountries; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set from * @param from (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder from(String from) { this.from = from; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set to * @param to (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder to(String to) { this.to = to; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set byParseDate * @param byParseDate (optional, default to false) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder byParseDate(Boolean byParseDate) { this.byParseDate = byParseDate; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set publishedDatePrecision * @param publishedDatePrecision (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder publishedDatePrecision(String publishedDatePrecision) { this.publishedDatePrecision = publishedDatePrecision; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set sortBy * @param sortBy (optional, default to relevancy) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder sortBy(String sortBy) { this.sortBy = sortBy; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set rankedOnly * @param rankedOnly (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder rankedOnly(Object rankedOnly) { this.rankedOnly = rankedOnly; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set fromRank * @param fromRank (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder fromRank(Integer fromRank) { this.fromRank = fromRank; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set toRank * @param toRank (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder toRank(Integer toRank) { this.toRank = toRank; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set isHeadline * @param isHeadline (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder isHeadline(Boolean isHeadline) { this.isHeadline = isHeadline; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set isOpinion * @param isOpinion (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder isOpinion(Boolean isOpinion) { this.isOpinion = isOpinion; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set isPaidContent * @param isPaidContent (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder isPaidContent(Boolean isPaidContent) { this.isPaidContent = isPaidContent; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set parentUrl * @param parentUrl (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder parentUrl(Object parentUrl) { this.parentUrl = parentUrl; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set allLinks * @param allLinks (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder allLinks(Object allLinks) { this.allLinks = allLinks; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set allDomainLinks * @param allDomainLinks (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder allDomainLinks(Object allDomainLinks) { this.allDomainLinks = allDomainLinks; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set wordCountMin * @param wordCountMin (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder wordCountMin(Integer wordCountMin) { this.wordCountMin = wordCountMin; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set wordCountMax * @param wordCountMax (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder wordCountMax(Integer wordCountMax) { this.wordCountMax = wordCountMax; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set page * @param page (optional, default to 1) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder page(Integer page) { this.page = page; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set pageSize * @param pageSize (optional, default to 100) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder pageSize(Integer pageSize) { this.pageSize = pageSize; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set includeNlpData * @param includeNlpData (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder includeNlpData(Boolean includeNlpData) { this.includeNlpData = includeNlpData; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set hasNlp * @param hasNlp (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder hasNlp(Boolean hasNlp) { this.hasNlp = hasNlp; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set theme * @param theme (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder theme(String theme) { this.theme = theme; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set notTheme * @param notTheme (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder notTheme(String notTheme) { this.notTheme = notTheme; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set titleSentimentMin * @param titleSentimentMin (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder titleSentimentMin(Double titleSentimentMin) { this.titleSentimentMin = titleSentimentMin; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set titleSentimentMax * @param titleSentimentMax (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder titleSentimentMax(Double titleSentimentMax) { this.titleSentimentMax = titleSentimentMax; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set contentSentimentMin * @param contentSentimentMin (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder contentSentimentMin(Double contentSentimentMin) { this.contentSentimentMin = contentSentimentMin; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set contentSentimentMax * @param contentSentimentMax (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder contentSentimentMax(Double contentSentimentMax) { this.contentSentimentMax = contentSentimentMax; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set iptcTags * @param iptcTags (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder iptcTags(Object iptcTags) { this.iptcTags = iptcTags; return (SearchSimilarApi.PostRequestBuilder) this; } /** * Set notIptcTags * @param notIptcTags (optional) * @return SearchSimilarApi.PostRequestBuilder */ public SearchSimilarApi.PostRequestBuilder notIptcTags(Object notIptcTags) { this.notIptcTags = notIptcTags; return (SearchSimilarApi.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 { MoreLikeThisRequest moreLikeThisRequest = buildBodyParams(); return postCall(moreLikeThisRequest, _callback); } private MoreLikeThisRequest buildBodyParams() { MoreLikeThisRequest moreLikeThisRequest = new MoreLikeThisRequest(); moreLikeThisRequest.q(this.q); moreLikeThisRequest.searchIn(this.searchIn); moreLikeThisRequest.includeSimilarDocuments(this.includeSimilarDocuments); moreLikeThisRequest.similarDocumentsNumber(this.similarDocumentsNumber); moreLikeThisRequest.similarDocumentsFields(this.similarDocumentsFields); moreLikeThisRequest.predefinedSources(this.predefinedSources); moreLikeThisRequest.sources(this.sources); moreLikeThisRequest.notSources(this.notSources); moreLikeThisRequest.lang(this.lang); moreLikeThisRequest.notLang(this.notLang); moreLikeThisRequest.countries(this.countries); moreLikeThisRequest.notCountries(this.notCountries); moreLikeThisRequest.from(this.from); moreLikeThisRequest.to(this.to); moreLikeThisRequest.byParseDate(this.byParseDate); moreLikeThisRequest.publishedDatePrecision(this.publishedDatePrecision); moreLikeThisRequest.sortBy(this.sortBy); moreLikeThisRequest.rankedOnly(this.rankedOnly); moreLikeThisRequest.fromRank(this.fromRank); moreLikeThisRequest.toRank(this.toRank); moreLikeThisRequest.isHeadline(this.isHeadline); moreLikeThisRequest.isOpinion(this.isOpinion); moreLikeThisRequest.isPaidContent(this.isPaidContent); moreLikeThisRequest.parentUrl(this.parentUrl); moreLikeThisRequest.allLinks(this.allLinks); moreLikeThisRequest.allDomainLinks(this.allDomainLinks); moreLikeThisRequest.wordCountMin(this.wordCountMin); moreLikeThisRequest.wordCountMax(this.wordCountMax); moreLikeThisRequest.page(this.page); moreLikeThisRequest.pageSize(this.pageSize); moreLikeThisRequest.includeNlpData(this.includeNlpData); moreLikeThisRequest.hasNlp(this.hasNlp); moreLikeThisRequest.theme(this.theme); moreLikeThisRequest.notTheme(this.notTheme); moreLikeThisRequest.titleSentimentMin(this.titleSentimentMin); moreLikeThisRequest.titleSentimentMax(this.titleSentimentMax); moreLikeThisRequest.contentSentimentMin(this.contentSentimentMin); moreLikeThisRequest.contentSentimentMax(this.contentSentimentMax); moreLikeThisRequest.iptcTags(this.iptcTags); moreLikeThisRequest.notIptcTags(this.notIptcTags); return moreLikeThisRequest; } /** * Execute post request * @return FSearchResponse3 * @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 FSearchResponse3 execute() throws ApiException { MoreLikeThisRequest moreLikeThisRequest = buildBodyParams(); ApiResponse localVarResp = postWithHttpInfo(moreLikeThisRequest); return localVarResp.getResponseBody(); } /** * Execute post request with HTTP info returned * @return ApiResponse<FSearchResponse3> * @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 { MoreLikeThisRequest moreLikeThisRequest = buildBodyParams(); return postWithHttpInfo(moreLikeThisRequest); } /** * 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 { MoreLikeThisRequest moreLikeThisRequest = buildBodyParams(); return postAsync(moreLikeThisRequest, _callback); } } /** * [Post] Search For Similar Articles Request * This endpoint returns a list of articles that are similar to the query provided. You also have the option to get similar articles for the results of a search. * @param moreLikeThisRequest (required) * @return PostRequestBuilder * @http.response.details
Status Code Description Response Headers
200 Successful Response -
*/ public SearchSimilarApi.PostRequestBuilder post(String q) throws IllegalArgumentException { if (q == null) throw new IllegalArgumentException("\"q\" is required but got null"); return ((SearchSimilarApi) this).new PostRequestBuilder(q); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy