Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
*/
public okhttp3.Call buildCall(final ApiCallback _callback) throws ApiException {
return getCall(authorName, notAuthorName, sources, predefinedSources, notSources, lang, notLang, countries, notCountries, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, iabTags, notIabTags, _callback);
}
/**
* Execute get request
* @return FSearchResponse
* @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 FSearchResponse execute() throws ApiException {
ApiResponse localVarResp = getWithHttpInfo(authorName, notAuthorName, sources, predefinedSources, notSources, lang, notLang, countries, notCountries, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, iabTags, notIabTags);
return localVarResp.getResponseBody();
}
/**
* Execute get request with HTTP info returned
* @return ApiResponse<FSearchResponse>
* @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(authorName, notAuthorName, sources, predefinedSources, notSources, lang, notLang, countries, notCountries, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, iabTags, notIabTags);
}
/**
* 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(authorName, notAuthorName, sources, predefinedSources, notSources, lang, notLang, countries, notCountries, from, to, publishedDatePrecision, byParseDate, sortBy, rankedOnly, fromRank, toRank, isHeadline, isOpinion, isPaidContent, parentUrl, allLinks, allDomainLinks, wordCountMin, wordCountMax, page, pageSize, includeNlpData, hasNlp, theme, notTheme, titleSentimentMin, titleSentimentMax, contentSentimentMin, contentSentimentMax, iptcTags, notIptcTags, iabTags, notIabTags, _callback);
}
}
/**
* [Get] Search By Author Request
* This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more.
* @param authorName (required)
* @return GetRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public AuthorsApi.GetRequestBuilder get(String authorName) throws IllegalArgumentException {
if (authorName == null) throw new IllegalArgumentException("\"authorName\" is required but got null");
return ((AuthorsApi) this).new GetRequestBuilder(authorName);
}
private okhttp3.Call postCall(AuthorSearchRequest authorSearchRequest, 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 = authorSearchRequest;
// create path and map variables
String localVarPath = "/api/authors";
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(AuthorSearchRequest authorSearchRequest, final ApiCallback _callback) throws ApiException {
// verify the required parameter 'authorSearchRequest' is set
if (authorSearchRequest == null) {
throw new ApiException("Missing the required parameter 'authorSearchRequest' when calling post(Async)");
}
return postCall(authorSearchRequest, _callback);
}
private ApiResponse postWithHttpInfo(AuthorSearchRequest authorSearchRequest) throws ApiException {
okhttp3.Call localVarCall = postValidateBeforeCall(authorSearchRequest, null);
Type localVarReturnType = new TypeToken(){}.getType();
return localVarApiClient.execute(localVarCall, localVarReturnType);
}
private okhttp3.Call postAsync(AuthorSearchRequest authorSearchRequest, final ApiCallback _callback) throws ApiException {
okhttp3.Call localVarCall = postValidateBeforeCall(authorSearchRequest, _callback);
Type localVarReturnType = new TypeToken(){}.getType();
localVarApiClient.executeAsync(localVarCall, localVarReturnType, _callback);
return localVarCall;
}
public abstract class PostRequestBuilderGenerated {
final String authorName;
String notAuthorName;
Object sources;
Object predefinedSources;
Object notSources;
Object lang;
Object notLang;
Object countries;
Object notCountries;
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;
Boolean includeNlpData;
Boolean hasNlp;
String theme;
String notTheme;
Double titleSentimentMin;
Double titleSentimentMax;
Double contentSentimentMin;
Double contentSentimentMax;
Object iptcTags;
Object notIptcTags;
Object iabTags;
Object notIabTags;
public PostRequestBuilderGenerated(String authorName) {
this.authorName = authorName;
}
/**
* Set notAuthorName
* @param notAuthorName (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notAuthorName(String notAuthorName) {
this.notAuthorName = notAuthorName;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set sources
* @param sources (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder sources(Object sources) {
this.sources = sources;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set predefinedSources
* @param predefinedSources (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder predefinedSources(Object predefinedSources) {
this.predefinedSources = predefinedSources;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set notSources
* @param notSources (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notSources(Object notSources) {
this.notSources = notSources;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set lang
* @param lang (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder lang(Object lang) {
this.lang = lang;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set notLang
* @param notLang (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notLang(Object notLang) {
this.notLang = notLang;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set countries
* @param countries (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder countries(Object countries) {
this.countries = countries;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set notCountries
* @param notCountries (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notCountries(Object notCountries) {
this.notCountries = notCountries;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set from
* @param from (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder from(String from) {
this.from = from;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set to
* @param to (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder to(String to) {
this.to = to;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set publishedDatePrecision
* @param publishedDatePrecision (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder publishedDatePrecision(String publishedDatePrecision) {
this.publishedDatePrecision = publishedDatePrecision;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set byParseDate
* @param byParseDate (optional, default to false)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder byParseDate(Boolean byParseDate) {
this.byParseDate = byParseDate;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set sortBy
* @param sortBy (optional, default to relevancy)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder sortBy(String sortBy) {
this.sortBy = sortBy;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set rankedOnly
* @param rankedOnly (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder rankedOnly(Object rankedOnly) {
this.rankedOnly = rankedOnly;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set fromRank
* @param fromRank (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder fromRank(Integer fromRank) {
this.fromRank = fromRank;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set toRank
* @param toRank (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder toRank(Integer toRank) {
this.toRank = toRank;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set isHeadline
* @param isHeadline (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder isHeadline(Boolean isHeadline) {
this.isHeadline = isHeadline;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set isOpinion
* @param isOpinion (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder isOpinion(Boolean isOpinion) {
this.isOpinion = isOpinion;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set isPaidContent
* @param isPaidContent (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder isPaidContent(Boolean isPaidContent) {
this.isPaidContent = isPaidContent;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set parentUrl
* @param parentUrl (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder parentUrl(Object parentUrl) {
this.parentUrl = parentUrl;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set allLinks
* @param allLinks (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder allLinks(Object allLinks) {
this.allLinks = allLinks;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set allDomainLinks
* @param allDomainLinks (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder allDomainLinks(Object allDomainLinks) {
this.allDomainLinks = allDomainLinks;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set wordCountMin
* @param wordCountMin (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder wordCountMin(Integer wordCountMin) {
this.wordCountMin = wordCountMin;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set wordCountMax
* @param wordCountMax (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder wordCountMax(Integer wordCountMax) {
this.wordCountMax = wordCountMax;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set page
* @param page (optional, default to 1)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder page(Integer page) {
this.page = page;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set pageSize
* @param pageSize (optional, default to 100)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder pageSize(Integer pageSize) {
this.pageSize = pageSize;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set includeNlpData
* @param includeNlpData (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder includeNlpData(Boolean includeNlpData) {
this.includeNlpData = includeNlpData;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set hasNlp
* @param hasNlp (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder hasNlp(Boolean hasNlp) {
this.hasNlp = hasNlp;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set theme
* @param theme (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder theme(String theme) {
this.theme = theme;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set notTheme
* @param notTheme (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notTheme(String notTheme) {
this.notTheme = notTheme;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set titleSentimentMin
* @param titleSentimentMin (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder titleSentimentMin(Double titleSentimentMin) {
this.titleSentimentMin = titleSentimentMin;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set titleSentimentMax
* @param titleSentimentMax (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder titleSentimentMax(Double titleSentimentMax) {
this.titleSentimentMax = titleSentimentMax;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set contentSentimentMin
* @param contentSentimentMin (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder contentSentimentMin(Double contentSentimentMin) {
this.contentSentimentMin = contentSentimentMin;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set contentSentimentMax
* @param contentSentimentMax (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder contentSentimentMax(Double contentSentimentMax) {
this.contentSentimentMax = contentSentimentMax;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set iptcTags
* @param iptcTags (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder iptcTags(Object iptcTags) {
this.iptcTags = iptcTags;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set notIptcTags
* @param notIptcTags (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notIptcTags(Object notIptcTags) {
this.notIptcTags = notIptcTags;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set iabTags
* @param iabTags (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder iabTags(Object iabTags) {
this.iabTags = iabTags;
return (AuthorsApi.PostRequestBuilder) this;
}
/**
* Set notIabTags
* @param notIabTags (optional)
* @return AuthorsApi.PostRequestBuilder
*/
public AuthorsApi.PostRequestBuilder notIabTags(Object notIabTags) {
this.notIabTags = notIabTags;
return (AuthorsApi.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 {
AuthorSearchRequest authorSearchRequest = buildBodyParams();
return postCall(authorSearchRequest, _callback);
}
private AuthorSearchRequest buildBodyParams() {
AuthorSearchRequest authorSearchRequest = new AuthorSearchRequest();
authorSearchRequest.authorName(this.authorName);
authorSearchRequest.notAuthorName(this.notAuthorName);
authorSearchRequest.sources(this.sources);
authorSearchRequest.predefinedSources(this.predefinedSources);
authorSearchRequest.notSources(this.notSources);
authorSearchRequest.lang(this.lang);
authorSearchRequest.notLang(this.notLang);
authorSearchRequest.countries(this.countries);
authorSearchRequest.notCountries(this.notCountries);
authorSearchRequest.from(this.from);
authorSearchRequest.to(this.to);
authorSearchRequest.publishedDatePrecision(this.publishedDatePrecision);
authorSearchRequest.byParseDate(this.byParseDate);
authorSearchRequest.sortBy(this.sortBy);
authorSearchRequest.rankedOnly(this.rankedOnly);
authorSearchRequest.fromRank(this.fromRank);
authorSearchRequest.toRank(this.toRank);
authorSearchRequest.isHeadline(this.isHeadline);
authorSearchRequest.isOpinion(this.isOpinion);
authorSearchRequest.isPaidContent(this.isPaidContent);
authorSearchRequest.parentUrl(this.parentUrl);
authorSearchRequest.allLinks(this.allLinks);
authorSearchRequest.allDomainLinks(this.allDomainLinks);
authorSearchRequest.wordCountMin(this.wordCountMin);
authorSearchRequest.wordCountMax(this.wordCountMax);
authorSearchRequest.page(this.page);
authorSearchRequest.pageSize(this.pageSize);
authorSearchRequest.includeNlpData(this.includeNlpData);
authorSearchRequest.hasNlp(this.hasNlp);
authorSearchRequest.theme(this.theme);
authorSearchRequest.notTheme(this.notTheme);
authorSearchRequest.titleSentimentMin(this.titleSentimentMin);
authorSearchRequest.titleSentimentMax(this.titleSentimentMax);
authorSearchRequest.contentSentimentMin(this.contentSentimentMin);
authorSearchRequest.contentSentimentMax(this.contentSentimentMax);
authorSearchRequest.iptcTags(this.iptcTags);
authorSearchRequest.notIptcTags(this.notIptcTags);
authorSearchRequest.iabTags(this.iabTags);
authorSearchRequest.notIabTags(this.notIabTags);
return authorSearchRequest;
}
/**
* Execute post request
* @return FSearchResponse1
* @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 FSearchResponse1 execute() throws ApiException {
AuthorSearchRequest authorSearchRequest = buildBodyParams();
ApiResponse localVarResp = postWithHttpInfo(authorSearchRequest);
return localVarResp.getResponseBody();
}
/**
* Execute post request with HTTP info returned
* @return ApiResponse<FSearchResponse1>
* @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 {
AuthorSearchRequest authorSearchRequest = buildBodyParams();
return postWithHttpInfo(authorSearchRequest);
}
/**
* 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 {
AuthorSearchRequest authorSearchRequest = buildBodyParams();
return postAsync(authorSearchRequest, _callback);
}
}
/**
* [Post] Search By Author Request
* This endpoint allows you to search for articles by author. You need to specify the author name. You can also filter by language, country, source, and more.
* @param authorSearchRequest (required)
* @return PostRequestBuilder
* @http.response.details
Status Code
Description
Response Headers
200
Successful Response
-
*/
public AuthorsApi.PostRequestBuilder post(String authorName) throws IllegalArgumentException {
if (authorName == null) throw new IllegalArgumentException("\"authorName\" is required but got null");
return ((AuthorsApi) this).new PostRequestBuilder(authorName);
}
}