From 42e9d17945fc08a0b9955ae35bfd92fc8ff0a210 Mon Sep 17 00:00:00 2001 From: "fern-api[bot]" <115122769+fern-api[bot]@users.noreply.github.com> Date: Mon, 13 Apr 2026 21:23:41 +0000 Subject: [PATCH] fix: replace @JsonProperty with @JsonIgnore on request getter methods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Request objects across multiple endpoints used @JsonProperty annotations on getter methods, which caused Jackson to inadvertently serialize request fields into the JSON body when these objects were used in contexts that triggered serialization. Replacing with @JsonIgnore ensures these request POJOs are not accidentally serialized as JSON bodies — parameters are instead passed as query/path parameters via the HTTP layer. Additionally, refactors RetryInterceptor to instantiate a fresh ExponentialBackoff per retry cycle rather than reusing a shared instance, preventing potential state leakage across concurrent or sequential requests. Key changes: - Replace @JsonProperty with @JsonIgnore on all getter methods in GetAggregationCountRequest, GetAuthorsRequest, and GetBreakingNewsRequest - Refactor RetryInterceptor to create a new ExponentialBackoff instance per retryChain() invocation instead of holding a shared instance 🌿 Generated with Fern --- .fern/metadata.json | 8 +- .fernignore | 1 + README.md | 7 +- build.gradle | 4 +- changelog.md | 16 +++ .../newscatcher/api/core/ClientOptions.java | 4 +- .../api/core/DoubleSerializer.java | 43 +++++++ .../newscatcher/api/core/ObjectMappers.java | 1 + .../api/core/RetryInterceptor.java | 9 +- .../requests/GetAggregationCountRequest.java | 92 +++++++------- .../authors/requests/GetAuthorsRequest.java | 90 +++++++------- .../requests/GetBreakingNewsRequest.java | 42 +++---- .../requests/GetLatestHeadlinesRequest.java | 92 +++++++------- .../search/requests/GetSearchRequest.java | 116 +++++++++--------- .../requests/GetSearchByLinkRequest.java | 16 +-- .../sources/requests/GetSourcesRequest.java | 24 ++-- 16 files changed, 314 insertions(+), 251 deletions(-) create mode 100644 changelog.md create mode 100644 src/main/java/com/newscatcher/api/core/DoubleSerializer.java diff --git a/.fern/metadata.json b/.fern/metadata.json index dfe97e3..ac0936d 100644 --- a/.fern/metadata.json +++ b/.fern/metadata.json @@ -1,10 +1,10 @@ { - "cliVersion": "4.29.0", + "cliVersion": "4.68.0", "generatorName": "fernapi/fern-java-sdk", - "generatorVersion": "3.44.1", + "generatorVersion": "4.1.4", "generatorConfig": { "publish-to": "central" }, - "originGitCommit": "bbd2054c67ad246b017399f96faf58cf6737bf01", - "sdkVersion": "2.0.0" + "originGitCommit": "e6e039aeca5c5b1f34982fd1ca7d3ec3ae6e1a02", + "sdkVersion": "2.0.1" } \ No newline at end of file diff --git a/.fernignore b/.fernignore index 7896a51..3a2ac6b 100644 --- a/.fernignore +++ b/.fernignore @@ -1,3 +1,4 @@ LICENSE # README.md +changelog.md diff --git a/README.md b/README.md index 1ac614f..5fdc0a3 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ Add the dependency in your `build.gradle` file: ```groovy dependencies { - implementation 'com.newscatcherapi:newscatcher-sdk' + implementation 'com.newscatcherapi:newscatcher-sdk:2.0.1' } ``` @@ -55,7 +55,7 @@ Add the dependency in your `pom.xml` file: com.newscatcherapi newscatcher-sdk - 2.0.0 + 2.0.1 ``` @@ -334,7 +334,7 @@ The `withRawResponse()` method returns a raw client that wraps all responses wit (A normal client's `response` is identical to a raw client's `response.body()`.) ```java -PostHttpResponse response = client.search().withRawResponse().post(...); +NewscatcherApiHttpResponse response = client.search().withRawResponse().post(...); System.out.println(response.body()); System.out.println(response.headers().get("X-My-Header")); @@ -353,3 +353,4 @@ On the other hand, contributions to the README are always very welcome! For release notes and changelog, visit our [GitHub releases page](https://github.com/Newscatcher/newscatcher-java/releases). + diff --git a/build.gradle b/build.gradle index 19a4cb8..760697f 100644 --- a/build.gradle +++ b/build.gradle @@ -47,7 +47,7 @@ java { group = 'com.newscatcherapi' -version = '2.0.0' +version = '2.0.1' jar { dependsOn(":generatePomFileForMavenPublication") @@ -78,7 +78,7 @@ publishing { maven(MavenPublication) { groupId = 'com.newscatcherapi' artifactId = 'newscatcher-sdk' - version = '2.0.0' + version = '2.0.1' from components.java pom { name = 'newscatcher' diff --git a/changelog.md b/changelog.md new file mode 100644 index 0000000..12067b9 --- /dev/null +++ b/changelog.md @@ -0,0 +1,16 @@ +## 2.0.1 - 2026-04-13 +* fix: replace @JsonProperty with @JsonIgnore on request getter methods +* Request objects across multiple endpoints used @JsonProperty annotations +* on getter methods, which caused Jackson to inadvertently serialize request +* fields into the JSON body when these objects were used in contexts that +* triggered serialization. Replacing with @JsonIgnore ensures these request +* POJOs are not accidentally serialized as JSON bodies — parameters are +* instead passed as query/path parameters via the HTTP layer. +* Additionally, refactors RetryInterceptor to instantiate a fresh +* ExponentialBackoff per retry cycle rather than reusing a shared instance, +* preventing potential state leakage across concurrent or sequential requests. +* Key changes: +* Replace @JsonProperty with @JsonIgnore on all getter methods in GetAggregationCountRequest, GetAuthorsRequest, and GetBreakingNewsRequest +* Refactor RetryInterceptor to create a new ExponentialBackoff instance per retryChain() invocation instead of holding a shared instance +* 🌿 Generated with Fern + diff --git a/src/main/java/com/newscatcher/api/core/ClientOptions.java b/src/main/java/com/newscatcher/api/core/ClientOptions.java index 8b1bf29..97193c7 100644 --- a/src/main/java/com/newscatcher/api/core/ClientOptions.java +++ b/src/main/java/com/newscatcher/api/core/ClientOptions.java @@ -38,10 +38,10 @@ private ClientOptions( this.headers.putAll(headers); this.headers.putAll(new HashMap() { { - put("User-Agent", "com.newscatcherapi:newscatcher-sdk/2.0.0"); + put("User-Agent", "com.newscatcherapi:newscatcher-sdk/2.0.1"); put("X-Fern-Language", "JAVA"); put("X-Fern-SDK-Name", "com.newscatcher.fern:api-sdk"); - put("X-Fern-SDK-Version", "2.0.0"); + put("X-Fern-SDK-Version", "2.0.1"); } }); this.headerSuppliers = headerSuppliers; diff --git a/src/main/java/com/newscatcher/api/core/DoubleSerializer.java b/src/main/java/com/newscatcher/api/core/DoubleSerializer.java new file mode 100644 index 0000000..e3cb0e9 --- /dev/null +++ b/src/main/java/com/newscatcher/api/core/DoubleSerializer.java @@ -0,0 +1,43 @@ +/** + * This file was auto-generated by Fern from our API Definition. + */ +package com.newscatcher.api.core; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.module.SimpleModule; +import java.io.IOException; + +/** + * Custom serializer that writes integer-valued doubles without a decimal point. + * For example, {@code 24000.0} is serialized as {@code 24000} instead of {@code 24000.0}. + * Non-integer values like {@code 3.14} are serialized normally. + */ +class DoubleSerializer extends JsonSerializer { + private static final SimpleModule MODULE; + + static { + MODULE = new SimpleModule() + .addSerializer(Double.class, new DoubleSerializer()) + .addSerializer(double.class, new DoubleSerializer()); + } + + /** + * Gets a module wrapping this serializer as an adapter for the Jackson ObjectMapper. + * + * @return A {@link SimpleModule} to be plugged onto Jackson ObjectMapper. + */ + public static SimpleModule getModule() { + return MODULE; + } + + @Override + public void serialize(Double value, JsonGenerator gen, SerializerProvider serializers) throws IOException { + if (value != null && value == Math.floor(value) && !Double.isInfinite(value) && !Double.isNaN(value)) { + gen.writeNumber(value.longValue()); + } else { + gen.writeNumber(value); + } + } +} diff --git a/src/main/java/com/newscatcher/api/core/ObjectMappers.java b/src/main/java/com/newscatcher/api/core/ObjectMappers.java index 8e78be8..315f90b 100644 --- a/src/main/java/com/newscatcher/api/core/ObjectMappers.java +++ b/src/main/java/com/newscatcher/api/core/ObjectMappers.java @@ -18,6 +18,7 @@ public final class ObjectMappers { .addModule(new Jdk8Module()) .addModule(new JavaTimeModule()) .addModule(DateTimeDeserializer.getModule()) + .addModule(DoubleSerializer.getModule()) .disable(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES) .disable(SerializationFeature.WRITE_DATES_AS_TIMESTAMPS) .build(); diff --git a/src/main/java/com/newscatcher/api/core/RetryInterceptor.java b/src/main/java/com/newscatcher/api/core/RetryInterceptor.java index 265fe1f..6a782b7 100644 --- a/src/main/java/com/newscatcher/api/core/RetryInterceptor.java +++ b/src/main/java/com/newscatcher/api/core/RetryInterceptor.java @@ -19,11 +19,11 @@ public class RetryInterceptor implements Interceptor { private static final Duration MAX_RETRY_DELAY = Duration.ofMillis(60000); private static final double JITTER_FACTOR = 0.2; - private final ExponentialBackoff backoff; + private final int maxRetries; private final Random random = new Random(); public RetryInterceptor(int maxRetries) { - this.backoff = new ExponentialBackoff(maxRetries); + this.maxRetries = maxRetries; } @Override @@ -38,7 +38,8 @@ public Response intercept(Chain chain) throws IOException { } private Response retryChain(Response response, Chain chain) throws IOException { - Optional nextBackoff = this.backoff.nextBackoff(response); + ExponentialBackoff backoff = new ExponentialBackoff(this.maxRetries); + Optional nextBackoff = backoff.nextBackoff(response); while (nextBackoff.isPresent()) { try { Thread.sleep(nextBackoff.get().toMillis()); @@ -48,7 +49,7 @@ private Response retryChain(Response response, Chain chain) throws IOException { response.close(); response = chain.proceed(chain.request()); if (shouldRetry(response.code())) { - nextBackoff = this.backoff.nextBackoff(response); + nextBackoff = backoff.nextBackoff(response); } else { return response; } diff --git a/src/main/java/com/newscatcher/api/resources/aggregationcount/requests/GetAggregationCountRequest.java b/src/main/java/com/newscatcher/api/resources/aggregationcount/requests/GetAggregationCountRequest.java index 8b003f3..be02cf9 100644 --- a/src/main/java/com/newscatcher/api/resources/aggregationcount/requests/GetAggregationCountRequest.java +++ b/src/main/java/com/newscatcher/api/resources/aggregationcount/requests/GetAggregationCountRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -212,17 +212,17 @@ private GetAggregationCountRequest( this.additionalProperties = additionalProperties; } - @JsonProperty("q") + @JsonIgnore public String getQ() { return q; } - @JsonProperty("aggregation_by") + @JsonIgnore public Optional getAggregationBy() { return aggregationBy; } - @JsonProperty("search_in") + @JsonIgnore public Optional getSearchIn() { return searchIn; } @@ -232,7 +232,7 @@ public Optional getSearchIn() { *

Format: start with the word top, followed by the number of desired sources, and then the two-letter country code ISO 3166-1 alpha-2.

*

Multiple countries with the number of top sources can be specified as a comma-separated string.

*/ - @JsonProperty("predefined_sources") + @JsonIgnore public Optional getPredefinedSources() { return predefinedSources; } @@ -240,7 +240,7 @@ public Optional getPredefinedSources() { /** * @return One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as finance.yahoo.com, are also acceptable.To specify multiple sources, use a comma-separated string. */ - @JsonProperty("sources") + @JsonIgnore public Optional getSources() { return sources; } @@ -248,7 +248,7 @@ public Optional getSources() { /** * @return The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. */ - @JsonProperty("not_sources") + @JsonIgnore public Optional getNotSources() { return notSources; } @@ -257,7 +257,7 @@ public Optional getNotSources() { * @return The language(s) of the search. The only accepted format is the two-letter ISO 639-1 code. To select multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("lang") + @JsonIgnore public Optional getLang() { return lang; } @@ -266,7 +266,7 @@ public Optional getLang() { * @return The language(s) to exclude from the search. The accepted format is the two-letter ISO 639-1 code. To exclude multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("not_lang") + @JsonIgnore public Optional getNotLang() { return notLang; } @@ -275,7 +275,7 @@ public Optional getNotLang() { * @return The countries where the news publisher is located. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To select multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("countries") + @JsonIgnore public Optional getCountries() { return countries; } @@ -284,7 +284,7 @@ public Optional getCountries() { * @return The publisher location countries to exclude from the search. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To exclude multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("not_countries") + @JsonIgnore public Optional getNotCountries() { return notCountries; } @@ -292,62 +292,62 @@ public Optional getNotCountries() { /** * @return The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. */ - @JsonProperty("not_author_name") + @JsonIgnore public Optional getNotAuthorName() { return notAuthorName; } - @JsonProperty("from_") + @JsonIgnore public Optional getFrom() { return from; } - @JsonProperty("to_") + @JsonIgnore public Optional getTo() { return to; } - @JsonProperty("published_date_precision") + @JsonIgnore public Optional getPublishedDatePrecision() { return publishedDatePrecision; } - @JsonProperty("by_parse_date") + @JsonIgnore public Optional getByParseDate() { return byParseDate; } - @JsonProperty("sort_by") + @JsonIgnore public Optional getSortBy() { return sortBy; } - @JsonProperty("ranked_only") + @JsonIgnore public Optional getRankedOnly() { return rankedOnly; } - @JsonProperty("from_rank") + @JsonIgnore public Optional getFromRank() { return fromRank; } - @JsonProperty("to_rank") + @JsonIgnore public Optional getToRank() { return toRank; } - @JsonProperty("is_headline") + @JsonIgnore public Optional getIsHeadline() { return isHeadline; } - @JsonProperty("is_opinion") + @JsonIgnore public Optional getIsOpinion() { return isOpinion; } - @JsonProperty("is_paid_content") + @JsonIgnore public Optional getIsPaidContent() { return isPaidContent; } @@ -355,7 +355,7 @@ public Optional getIsPaidContent() { /** * @return The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. */ - @JsonProperty("parent_url") + @JsonIgnore public Optional getParentUrl() { return parentUrl; } @@ -364,7 +364,7 @@ public Optional getParentUrl() { * @return The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_links") + @JsonIgnore public Optional getAllLinks() { return allLinks; } @@ -373,7 +373,7 @@ public Optional getAllLinks() { * @return The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_domain_links") + @JsonIgnore public Optional getAllDomainLinks() { return allDomainLinks; } @@ -383,87 +383,87 @@ public Optional getAllDomainLinks() { *

Note: When this parameter is used, the response includes the all_links_data field with detailed link information.

*

To learn more, see Search by URL.

*/ - @JsonProperty("all_links_text") + @JsonIgnore public Optional getAllLinksText() { return allLinksText; } - @JsonProperty("word_count_min") + @JsonIgnore public Optional getWordCountMin() { return wordCountMin; } - @JsonProperty("word_count_max") + @JsonIgnore public Optional getWordCountMax() { return wordCountMax; } - @JsonProperty("page") + @JsonIgnore public Optional getPage() { return page; } - @JsonProperty("page_size") + @JsonIgnore public Optional getPageSize() { return pageSize; } - @JsonProperty("include_nlp_data") + @JsonIgnore public Optional getIncludeNlpData() { return includeNlpData; } - @JsonProperty("has_nlp") + @JsonIgnore public Optional getHasNlp() { return hasNlp; } - @JsonProperty("theme") + @JsonIgnore public Optional getTheme() { return theme; } - @JsonProperty("not_theme") + @JsonIgnore public Optional getNotTheme() { return notTheme; } - @JsonProperty("ORG_entity_name") + @JsonIgnore public Optional getOrgEntityName() { return orgEntityName; } - @JsonProperty("PER_entity_name") + @JsonIgnore public Optional getPerEntityName() { return perEntityName; } - @JsonProperty("LOC_entity_name") + @JsonIgnore public Optional getLocEntityName() { return locEntityName; } - @JsonProperty("MISC_entity_name") + @JsonIgnore public Optional getMiscEntityName() { return miscEntityName; } - @JsonProperty("title_sentiment_min") + @JsonIgnore public Optional getTitleSentimentMin() { return titleSentimentMin; } - @JsonProperty("title_sentiment_max") + @JsonIgnore public Optional getTitleSentimentMax() { return titleSentimentMax; } - @JsonProperty("content_sentiment_min") + @JsonIgnore public Optional getContentSentimentMin() { return contentSentimentMin; } - @JsonProperty("content_sentiment_max") + @JsonIgnore public Optional getContentSentimentMax() { return contentSentimentMax; } @@ -473,7 +473,7 @@ public Optional getContentSentimentMax() { *

Note: The iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("iptc_tags") + @JsonIgnore public Optional getIptcTags() { return iptcTags; } @@ -483,12 +483,12 @@ public Optional getIptcTags() { *

Note: The not_iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("not_iptc_tags") + @JsonIgnore public Optional getNotIptcTags() { return notIptcTags; } - @JsonProperty("robots_compliant") + @JsonIgnore public Optional getRobotsCompliant() { return robotsCompliant; } diff --git a/src/main/java/com/newscatcher/api/resources/authors/requests/GetAuthorsRequest.java b/src/main/java/com/newscatcher/api/resources/authors/requests/GetAuthorsRequest.java index f89605f..b68f3c9 100644 --- a/src/main/java/com/newscatcher/api/resources/authors/requests/GetAuthorsRequest.java +++ b/src/main/java/com/newscatcher/api/resources/authors/requests/GetAuthorsRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -207,7 +207,7 @@ private GetAuthorsRequest( this.additionalProperties = additionalProperties; } - @JsonProperty("author_name") + @JsonIgnore public String getAuthorName() { return authorName; } @@ -215,7 +215,7 @@ public String getAuthorName() { /** * @return The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. */ - @JsonProperty("not_author_name") + @JsonIgnore public Optional getNotAuthorName() { return notAuthorName; } @@ -225,7 +225,7 @@ public Optional getNotAuthorName() { *

Format: start with the word top, followed by the number of desired sources, and then the two-letter country code ISO 3166-1 alpha-2.

*

Multiple countries with the number of top sources can be specified as a comma-separated string.

*/ - @JsonProperty("predefined_sources") + @JsonIgnore public Optional getPredefinedSources() { return predefinedSources; } @@ -233,7 +233,7 @@ public Optional getPredefinedSources() { /** * @return One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as finance.yahoo.com, are also acceptable.To specify multiple sources, use a comma-separated string. */ - @JsonProperty("sources") + @JsonIgnore public Optional getSources() { return sources; } @@ -241,7 +241,7 @@ public Optional getSources() { /** * @return The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. */ - @JsonProperty("not_sources") + @JsonIgnore public Optional getNotSources() { return notSources; } @@ -250,7 +250,7 @@ public Optional getNotSources() { * @return The language(s) of the search. The only accepted format is the two-letter ISO 639-1 code. To select multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("lang") + @JsonIgnore public Optional getLang() { return lang; } @@ -259,7 +259,7 @@ public Optional getLang() { * @return The language(s) to exclude from the search. The accepted format is the two-letter ISO 639-1 code. To exclude multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("not_lang") + @JsonIgnore public Optional getNotLang() { return notLang; } @@ -268,7 +268,7 @@ public Optional getNotLang() { * @return The countries where the news publisher is located. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To select multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("countries") + @JsonIgnore public Optional getCountries() { return countries; } @@ -277,62 +277,62 @@ public Optional getCountries() { * @return The publisher location countries to exclude from the search. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To exclude multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("not_countries") + @JsonIgnore public Optional getNotCountries() { return notCountries; } - @JsonProperty("from_") + @JsonIgnore public Optional getFrom() { return from; } - @JsonProperty("to_") + @JsonIgnore public Optional getTo() { return to; } - @JsonProperty("published_date_precision") + @JsonIgnore public Optional getPublishedDatePrecision() { return publishedDatePrecision; } - @JsonProperty("by_parse_date") + @JsonIgnore public Optional getByParseDate() { return byParseDate; } - @JsonProperty("sort_by") + @JsonIgnore public Optional getSortBy() { return sortBy; } - @JsonProperty("ranked_only") + @JsonIgnore public Optional getRankedOnly() { return rankedOnly; } - @JsonProperty("from_rank") + @JsonIgnore public Optional getFromRank() { return fromRank; } - @JsonProperty("to_rank") + @JsonIgnore public Optional getToRank() { return toRank; } - @JsonProperty("is_headline") + @JsonIgnore public Optional getIsHeadline() { return isHeadline; } - @JsonProperty("is_opinion") + @JsonIgnore public Optional getIsOpinion() { return isOpinion; } - @JsonProperty("is_paid_content") + @JsonIgnore public Optional getIsPaidContent() { return isPaidContent; } @@ -340,7 +340,7 @@ public Optional getIsPaidContent() { /** * @return The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. */ - @JsonProperty("parent_url") + @JsonIgnore public Optional getParentUrl() { return parentUrl; } @@ -349,7 +349,7 @@ public Optional getParentUrl() { * @return The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_links") + @JsonIgnore public Optional getAllLinks() { return allLinks; } @@ -358,7 +358,7 @@ public Optional getAllLinks() { * @return The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_domain_links") + @JsonIgnore public Optional getAllDomainLinks() { return allDomainLinks; } @@ -368,77 +368,77 @@ public Optional getAllDomainLinks() { *

Note: When this parameter is used, the response includes the all_links_data field with detailed link information.

*

To learn more, see Search by URL.

*/ - @JsonProperty("all_links_text") + @JsonIgnore public Optional getAllLinksText() { return allLinksText; } - @JsonProperty("word_count_min") + @JsonIgnore public Optional getWordCountMin() { return wordCountMin; } - @JsonProperty("word_count_max") + @JsonIgnore public Optional getWordCountMax() { return wordCountMax; } - @JsonProperty("page") + @JsonIgnore public Optional getPage() { return page; } - @JsonProperty("page_size") + @JsonIgnore public Optional getPageSize() { return pageSize; } - @JsonProperty("include_translation_fields") + @JsonIgnore public Optional getIncludeTranslationFields() { return includeTranslationFields; } - @JsonProperty("include_nlp_data") + @JsonIgnore public Optional getIncludeNlpData() { return includeNlpData; } - @JsonProperty("has_nlp") + @JsonIgnore public Optional getHasNlp() { return hasNlp; } - @JsonProperty("theme") + @JsonIgnore public Optional getTheme() { return theme; } - @JsonProperty("not_theme") + @JsonIgnore public Optional getNotTheme() { return notTheme; } - @JsonProperty("ner_name") + @JsonIgnore public Optional getNerName() { return nerName; } - @JsonProperty("title_sentiment_min") + @JsonIgnore public Optional getTitleSentimentMin() { return titleSentimentMin; } - @JsonProperty("title_sentiment_max") + @JsonIgnore public Optional getTitleSentimentMax() { return titleSentimentMax; } - @JsonProperty("content_sentiment_min") + @JsonIgnore public Optional getContentSentimentMin() { return contentSentimentMin; } - @JsonProperty("content_sentiment_max") + @JsonIgnore public Optional getContentSentimentMax() { return contentSentimentMax; } @@ -448,7 +448,7 @@ public Optional getContentSentimentMax() { *

Note: The iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("iptc_tags") + @JsonIgnore public Optional getIptcTags() { return iptcTags; } @@ -458,7 +458,7 @@ public Optional getIptcTags() { *

Note: The not_iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("not_iptc_tags") + @JsonIgnore public Optional getNotIptcTags() { return notIptcTags; } @@ -468,7 +468,7 @@ public Optional getNotIptcTags() { *

Note: The iab_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see the IAB Content taxonomy.

*/ - @JsonProperty("iab_tags") + @JsonIgnore public Optional getIabTags() { return iabTags; } @@ -478,7 +478,7 @@ public Optional getIabTags() { *

Note: The not_iab_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see the IAB Content taxonomy.

*/ - @JsonProperty("not_iab_tags") + @JsonIgnore public Optional getNotIabTags() { return notIabTags; } @@ -491,12 +491,12 @@ public Optional getNotIabTags() { *

Example: custom_tags.industry="Manufacturing,Logistics"

*

To learn more, see the Custom tags.

*/ - @JsonProperty("custom_tags") + @JsonIgnore public Optional getCustomTags() { return customTags; } - @JsonProperty("robots_compliant") + @JsonIgnore public Optional getRobotsCompliant() { return robotsCompliant; } diff --git a/src/main/java/com/newscatcher/api/resources/breakingnews/requests/GetBreakingNewsRequest.java b/src/main/java/com/newscatcher/api/resources/breakingnews/requests/GetBreakingNewsRequest.java index e8101ad..96765b0 100644 --- a/src/main/java/com/newscatcher/api/resources/breakingnews/requests/GetBreakingNewsRequest.java +++ b/src/main/java/com/newscatcher/api/resources/breakingnews/requests/GetBreakingNewsRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -108,102 +108,102 @@ private GetBreakingNewsRequest( this.additionalProperties = additionalProperties; } - @JsonProperty("sort_by") + @JsonIgnore public Optional getSortBy() { return sortBy; } - @JsonProperty("ranked_only") + @JsonIgnore public Optional getRankedOnly() { return rankedOnly; } - @JsonProperty("from_rank") + @JsonIgnore public Optional getFromRank() { return fromRank; } - @JsonProperty("to_rank") + @JsonIgnore public Optional getToRank() { return toRank; } - @JsonProperty("page") + @JsonIgnore public Optional getPage() { return page; } - @JsonProperty("page_size") + @JsonIgnore public Optional getPageSize() { return pageSize; } - @JsonProperty("top_n_articles") + @JsonIgnore public Optional getTopNArticles() { return topNArticles; } - @JsonProperty("include_translation_fields") + @JsonIgnore public Optional getIncludeTranslationFields() { return includeTranslationFields; } - @JsonProperty("include_nlp_data") + @JsonIgnore public Optional getIncludeNlpData() { return includeNlpData; } - @JsonProperty("has_nlp") + @JsonIgnore public Optional getHasNlp() { return hasNlp; } - @JsonProperty("theme") + @JsonIgnore public Optional getTheme() { return theme; } - @JsonProperty("not_theme") + @JsonIgnore public Optional getNotTheme() { return notTheme; } - @JsonProperty("ORG_entity_name") + @JsonIgnore public Optional getOrgEntityName() { return orgEntityName; } - @JsonProperty("PER_entity_name") + @JsonIgnore public Optional getPerEntityName() { return perEntityName; } - @JsonProperty("LOC_entity_name") + @JsonIgnore public Optional getLocEntityName() { return locEntityName; } - @JsonProperty("MISC_entity_name") + @JsonIgnore public Optional getMiscEntityName() { return miscEntityName; } - @JsonProperty("title_sentiment_min") + @JsonIgnore public Optional getTitleSentimentMin() { return titleSentimentMin; } - @JsonProperty("title_sentiment_max") + @JsonIgnore public Optional getTitleSentimentMax() { return titleSentimentMax; } - @JsonProperty("content_sentiment_min") + @JsonIgnore public Optional getContentSentimentMin() { return contentSentimentMin; } - @JsonProperty("content_sentiment_max") + @JsonIgnore public Optional getContentSentimentMax() { return contentSentimentMax; } diff --git a/src/main/java/com/newscatcher/api/resources/latestheadlines/requests/GetLatestHeadlinesRequest.java b/src/main/java/com/newscatcher/api/resources/latestheadlines/requests/GetLatestHeadlinesRequest.java index e4b0e78..1c2266f 100644 --- a/src/main/java/com/newscatcher/api/resources/latestheadlines/requests/GetLatestHeadlinesRequest.java +++ b/src/main/java/com/newscatcher/api/resources/latestheadlines/requests/GetLatestHeadlinesRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -209,17 +209,17 @@ private GetLatestHeadlinesRequest( this.additionalProperties = additionalProperties; } - @JsonProperty("when") + @JsonIgnore public Optional getWhen() { return when; } - @JsonProperty("by_parse_date") + @JsonIgnore public Optional getByParseDate() { return byParseDate; } - @JsonProperty("sort_by") + @JsonIgnore public Optional getSortBy() { return sortBy; } @@ -228,7 +228,7 @@ public Optional getSortBy() { * @return The language(s) of the search. The only accepted format is the two-letter ISO 639-1 code. To select multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("lang") + @JsonIgnore public Optional getLang() { return lang; } @@ -237,7 +237,7 @@ public Optional getLang() { * @return The language(s) to exclude from the search. The accepted format is the two-letter ISO 639-1 code. To exclude multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("not_lang") + @JsonIgnore public Optional getNotLang() { return notLang; } @@ -246,7 +246,7 @@ public Optional getNotLang() { * @return The countries where the news publisher is located. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To select multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("countries") + @JsonIgnore public Optional getCountries() { return countries; } @@ -255,7 +255,7 @@ public Optional getCountries() { * @return The publisher location countries to exclude from the search. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To exclude multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("not_countries") + @JsonIgnore public Optional getNotCountries() { return notCountries; } @@ -265,7 +265,7 @@ public Optional getNotCountries() { *

Format: start with the word top, followed by the number of desired sources, and then the two-letter country code ISO 3166-1 alpha-2.

*

Multiple countries with the number of top sources can be specified as a comma-separated string.

*/ - @JsonProperty("predefined_sources") + @JsonIgnore public Optional getPredefinedSources() { return predefinedSources; } @@ -273,7 +273,7 @@ public Optional getPredefinedSources() { /** * @return One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as finance.yahoo.com, are also acceptable.To specify multiple sources, use a comma-separated string. */ - @JsonProperty("sources") + @JsonIgnore public Optional getSources() { return sources; } @@ -281,7 +281,7 @@ public Optional getSources() { /** * @return The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. */ - @JsonProperty("not_sources") + @JsonIgnore public Optional getNotSources() { return notSources; } @@ -289,27 +289,27 @@ public Optional getNotSources() { /** * @return The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. */ - @JsonProperty("not_author_name") + @JsonIgnore public Optional getNotAuthorName() { return notAuthorName; } - @JsonProperty("ranked_only") + @JsonIgnore public Optional getRankedOnly() { return rankedOnly; } - @JsonProperty("is_headline") + @JsonIgnore public Optional getIsHeadline() { return isHeadline; } - @JsonProperty("is_opinion") + @JsonIgnore public Optional getIsOpinion() { return isOpinion; } - @JsonProperty("is_paid_content") + @JsonIgnore public Optional getIsPaidContent() { return isPaidContent; } @@ -317,7 +317,7 @@ public Optional getIsPaidContent() { /** * @return The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. */ - @JsonProperty("parent_url") + @JsonIgnore public Optional getParentUrl() { return parentUrl; } @@ -326,7 +326,7 @@ public Optional getParentUrl() { * @return The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_links") + @JsonIgnore public Optional getAllLinks() { return allLinks; } @@ -335,7 +335,7 @@ public Optional getAllLinks() { * @return The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_domain_links") + @JsonIgnore public Optional getAllDomainLinks() { return allDomainLinks; } @@ -345,107 +345,107 @@ public Optional getAllDomainLinks() { *

Note: When this parameter is used, the response includes the all_links_data field with detailed link information.

*

To learn more, see Search by URL.

*/ - @JsonProperty("all_links_text") + @JsonIgnore public Optional getAllLinksText() { return allLinksText; } - @JsonProperty("word_count_min") + @JsonIgnore public Optional getWordCountMin() { return wordCountMin; } - @JsonProperty("word_count_max") + @JsonIgnore public Optional getWordCountMax() { return wordCountMax; } - @JsonProperty("page") + @JsonIgnore public Optional getPage() { return page; } - @JsonProperty("page_size") + @JsonIgnore public Optional getPageSize() { return pageSize; } - @JsonProperty("clustering_enabled") + @JsonIgnore public Optional getClusteringEnabled() { return clusteringEnabled; } - @JsonProperty("clustering_variable") + @JsonIgnore public Optional getClusteringVariable() { return clusteringVariable; } - @JsonProperty("clustering_threshold") + @JsonIgnore public Optional getClusteringThreshold() { return clusteringThreshold; } - @JsonProperty("include_translation_fields") + @JsonIgnore public Optional getIncludeTranslationFields() { return includeTranslationFields; } - @JsonProperty("include_nlp_data") + @JsonIgnore public Optional getIncludeNlpData() { return includeNlpData; } - @JsonProperty("has_nlp") + @JsonIgnore public Optional getHasNlp() { return hasNlp; } - @JsonProperty("theme") + @JsonIgnore public Optional getTheme() { return theme; } - @JsonProperty("not_theme") + @JsonIgnore public Optional getNotTheme() { return notTheme; } - @JsonProperty("ORG_entity_name") + @JsonIgnore public Optional getOrgEntityName() { return orgEntityName; } - @JsonProperty("PER_entity_name") + @JsonIgnore public Optional getPerEntityName() { return perEntityName; } - @JsonProperty("LOC_entity_name") + @JsonIgnore public Optional getLocEntityName() { return locEntityName; } - @JsonProperty("MISC_entity_name") + @JsonIgnore public Optional getMiscEntityName() { return miscEntityName; } - @JsonProperty("title_sentiment_min") + @JsonIgnore public Optional getTitleSentimentMin() { return titleSentimentMin; } - @JsonProperty("title_sentiment_max") + @JsonIgnore public Optional getTitleSentimentMax() { return titleSentimentMax; } - @JsonProperty("content_sentiment_min") + @JsonIgnore public Optional getContentSentimentMin() { return contentSentimentMin; } - @JsonProperty("content_sentiment_max") + @JsonIgnore public Optional getContentSentimentMax() { return contentSentimentMax; } @@ -455,7 +455,7 @@ public Optional getContentSentimentMax() { *

Note: The iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("iptc_tags") + @JsonIgnore public Optional getIptcTags() { return iptcTags; } @@ -465,7 +465,7 @@ public Optional getIptcTags() { *

Note: The not_iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("not_iptc_tags") + @JsonIgnore public Optional getNotIptcTags() { return notIptcTags; } @@ -475,7 +475,7 @@ public Optional getNotIptcTags() { *

Note: The iab_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see the IAB Content taxonomy.

*/ - @JsonProperty("iab_tags") + @JsonIgnore public Optional getIabTags() { return iabTags; } @@ -485,7 +485,7 @@ public Optional getIabTags() { *

Note: The not_iab_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see the IAB Content taxonomy.

*/ - @JsonProperty("not_iab_tags") + @JsonIgnore public Optional getNotIabTags() { return notIabTags; } @@ -498,12 +498,12 @@ public Optional getNotIabTags() { *

Example: custom_tags.industry="Manufacturing,Logistics"

*

To learn more, see the Custom tags.

*/ - @JsonProperty("custom_tags") + @JsonIgnore public Optional getCustomTags() { return customTags; } - @JsonProperty("robots_compliant") + @JsonIgnore public Optional getRobotsCompliant() { return robotsCompliant; } diff --git a/src/main/java/com/newscatcher/api/resources/search/requests/GetSearchRequest.java b/src/main/java/com/newscatcher/api/resources/search/requests/GetSearchRequest.java index 35f5f53..8742f76 100644 --- a/src/main/java/com/newscatcher/api/resources/search/requests/GetSearchRequest.java +++ b/src/main/java/com/newscatcher/api/resources/search/requests/GetSearchRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -261,17 +261,17 @@ private GetSearchRequest( this.additionalProperties = additionalProperties; } - @JsonProperty("q") + @JsonIgnore public String getQ() { return q; } - @JsonProperty("search_in") + @JsonIgnore public Optional getSearchIn() { return searchIn; } - @JsonProperty("include_translation_fields") + @JsonIgnore public Optional getIncludeTranslationFields() { return includeTranslationFields; } @@ -281,7 +281,7 @@ public Optional getIncludeTranslationFields() { *

Format: start with the word top, followed by the number of desired sources, and then the two-letter country code ISO 3166-1 alpha-2.

*

Multiple countries with the number of top sources can be specified as a comma-separated string.

*/ - @JsonProperty("predefined_sources") + @JsonIgnore public Optional getPredefinedSources() { return predefinedSources; } @@ -290,7 +290,7 @@ public Optional getPredefinedSources() { * @return Word or phrase to search within the source names. To specify multiple values, use a comma-separated string. *

Note: The search doesn't require an exact match and returns sources containing the specified terms in their names. You can use any word or phrase, like "sport" or "new york times". For example, "sport" returns sources such as "Motorsport", "Dot Esport", and "Tuttosport".

*/ - @JsonProperty("source_name") + @JsonIgnore public Optional getSourceName() { return sourceName; } @@ -298,7 +298,7 @@ public Optional getSourceName() { /** * @return One or more news sources to narrow down the search. The format must be a domain URL. Subdomains, such as finance.yahoo.com, are also acceptable.To specify multiple sources, use a comma-separated string. */ - @JsonProperty("sources") + @JsonIgnore public Optional getSources() { return sources; } @@ -306,7 +306,7 @@ public Optional getSources() { /** * @return The news sources to exclude from the search. To exclude multiple sources, use a comma-separated string. */ - @JsonProperty("not_sources") + @JsonIgnore public Optional getNotSources() { return notSources; } @@ -315,7 +315,7 @@ public Optional getNotSources() { * @return The language(s) of the search. The only accepted format is the two-letter ISO 639-1 code. To select multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("lang") + @JsonIgnore public Optional getLang() { return lang; } @@ -324,7 +324,7 @@ public Optional getLang() { * @return The language(s) to exclude from the search. The accepted format is the two-letter ISO 639-1 code. To exclude multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("not_lang") + @JsonIgnore public Optional getNotLang() { return notLang; } @@ -333,7 +333,7 @@ public Optional getNotLang() { * @return The countries where the news publisher is located. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To select multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("countries") + @JsonIgnore public Optional getCountries() { return countries; } @@ -342,7 +342,7 @@ public Optional getCountries() { * @return The publisher location countries to exclude from the search. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To exclude multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("not_countries") + @JsonIgnore public Optional getNotCountries() { return notCountries; } @@ -350,62 +350,62 @@ public Optional getNotCountries() { /** * @return The list of author names to exclude from your search. To exclude articles by specific authors, use a comma-separated string. */ - @JsonProperty("not_author_name") + @JsonIgnore public Optional getNotAuthorName() { return notAuthorName; } - @JsonProperty("from_") + @JsonIgnore public Optional getFrom() { return from; } - @JsonProperty("to_") + @JsonIgnore public Optional getTo() { return to; } - @JsonProperty("published_date_precision") + @JsonIgnore public Optional getPublishedDatePrecision() { return publishedDatePrecision; } - @JsonProperty("by_parse_date") + @JsonIgnore public Optional getByParseDate() { return byParseDate; } - @JsonProperty("sort_by") + @JsonIgnore public Optional getSortBy() { return sortBy; } - @JsonProperty("ranked_only") + @JsonIgnore public Optional getRankedOnly() { return rankedOnly; } - @JsonProperty("from_rank") + @JsonIgnore public Optional getFromRank() { return fromRank; } - @JsonProperty("to_rank") + @JsonIgnore public Optional getToRank() { return toRank; } - @JsonProperty("is_headline") + @JsonIgnore public Optional getIsHeadline() { return isHeadline; } - @JsonProperty("is_opinion") + @JsonIgnore public Optional getIsOpinion() { return isOpinion; } - @JsonProperty("is_paid_content") + @JsonIgnore public Optional getIsPaidContent() { return isPaidContent; } @@ -413,7 +413,7 @@ public Optional getIsPaidContent() { /** * @return The categorical URL(s) to filter your search. To filter your search by multiple categorical URLs, use a comma-separated string. */ - @JsonProperty("parent_url") + @JsonIgnore public Optional getParentUrl() { return parentUrl; } @@ -422,7 +422,7 @@ public Optional getParentUrl() { * @return The complete URL(s) mentioned in the article. For multiple URLs, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_links") + @JsonIgnore public Optional getAllLinks() { return allLinks; } @@ -431,7 +431,7 @@ public Optional getAllLinks() { * @return The domain(s) mentioned in the article. For multiple domains, use a comma-separated string. *

For more details, see Search by URL.

*/ - @JsonProperty("all_domain_links") + @JsonIgnore public Optional getAllDomainLinks() { return allDomainLinks; } @@ -441,22 +441,22 @@ public Optional getAllDomainLinks() { *

Note: When this parameter is used, the response includes the all_links_data field with detailed link information.

*

To learn more, see Search by URL.

*/ - @JsonProperty("all_links_text") + @JsonIgnore public Optional getAllLinksText() { return allLinksText; } - @JsonProperty("additional_domain_info") + @JsonIgnore public Optional getAdditionalDomainInfo() { return additionalDomainInfo; } - @JsonProperty("is_news_domain") + @JsonIgnore public Optional getIsNewsDomain() { return isNewsDomain; } - @JsonProperty("news_domain_type") + @JsonIgnore public Optional getNewsDomainType() { return newsDomainType; } @@ -465,102 +465,102 @@ public Optional getNewsDomainType() { * @return Filters results based on the news type. Multiple types can be specified using a comma-separated string. *

For a complete list of available news types, see Enumerated parameters > News type.

*/ - @JsonProperty("news_type") + @JsonIgnore public Optional getNewsType() { return newsType; } - @JsonProperty("word_count_min") + @JsonIgnore public Optional getWordCountMin() { return wordCountMin; } - @JsonProperty("word_count_max") + @JsonIgnore public Optional getWordCountMax() { return wordCountMax; } - @JsonProperty("page") + @JsonIgnore public Optional getPage() { return page; } - @JsonProperty("page_size") + @JsonIgnore public Optional getPageSize() { return pageSize; } - @JsonProperty("clustering_enabled") + @JsonIgnore public Optional getClusteringEnabled() { return clusteringEnabled; } - @JsonProperty("clustering_variable") + @JsonIgnore public Optional getClusteringVariable() { return clusteringVariable; } - @JsonProperty("clustering_threshold") + @JsonIgnore public Optional getClusteringThreshold() { return clusteringThreshold; } - @JsonProperty("include_nlp_data") + @JsonIgnore public Optional getIncludeNlpData() { return includeNlpData; } - @JsonProperty("has_nlp") + @JsonIgnore public Optional getHasNlp() { return hasNlp; } - @JsonProperty("theme") + @JsonIgnore public Optional getTheme() { return theme; } - @JsonProperty("not_theme") + @JsonIgnore public Optional getNotTheme() { return notTheme; } - @JsonProperty("ORG_entity_name") + @JsonIgnore public Optional getOrgEntityName() { return orgEntityName; } - @JsonProperty("PER_entity_name") + @JsonIgnore public Optional getPerEntityName() { return perEntityName; } - @JsonProperty("LOC_entity_name") + @JsonIgnore public Optional getLocEntityName() { return locEntityName; } - @JsonProperty("MISC_entity_name") + @JsonIgnore public Optional getMiscEntityName() { return miscEntityName; } - @JsonProperty("title_sentiment_min") + @JsonIgnore public Optional getTitleSentimentMin() { return titleSentimentMin; } - @JsonProperty("title_sentiment_max") + @JsonIgnore public Optional getTitleSentimentMax() { return titleSentimentMax; } - @JsonProperty("content_sentiment_min") + @JsonIgnore public Optional getContentSentimentMin() { return contentSentimentMin; } - @JsonProperty("content_sentiment_max") + @JsonIgnore public Optional getContentSentimentMax() { return contentSentimentMax; } @@ -570,7 +570,7 @@ public Optional getContentSentimentMax() { *

Note: The iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("iptc_tags") + @JsonIgnore public Optional getIptcTags() { return iptcTags; } @@ -580,7 +580,7 @@ public Optional getIptcTags() { *

Note: The not_iptc_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see IPTC Media Topic NewsCodes.

*/ - @JsonProperty("not_iptc_tags") + @JsonIgnore public Optional getNotIptcTags() { return notIptcTags; } @@ -590,7 +590,7 @@ public Optional getNotIptcTags() { *

Note: The iab_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see the IAB Content taxonomy.

*/ - @JsonProperty("iab_tags") + @JsonIgnore public Optional getIabTags() { return iabTags; } @@ -600,7 +600,7 @@ public Optional getIabTags() { *

Note: The not_iab_tags parameter is only available in the v3_nlp_iptc_tags subscription plan.

*

To learn more, see the IAB Content taxonomy.

*/ - @JsonProperty("not_iab_tags") + @JsonIgnore public Optional getNotIabTags() { return notIabTags; } @@ -613,17 +613,17 @@ public Optional getNotIabTags() { *

Example: custom_tags.industry="Manufacturing,Logistics"

*

To learn more, see the Custom tags.

*/ - @JsonProperty("custom_tags") + @JsonIgnore public Optional getCustomTags() { return customTags; } - @JsonProperty("exclude_duplicates") + @JsonIgnore public Optional getExcludeDuplicates() { return excludeDuplicates; } - @JsonProperty("robots_compliant") + @JsonIgnore public Optional getRobotsCompliant() { return robotsCompliant; } diff --git a/src/main/java/com/newscatcher/api/resources/searchbylink/requests/GetSearchByLinkRequest.java b/src/main/java/com/newscatcher/api/resources/searchbylink/requests/GetSearchByLinkRequest.java index 5979dae..a51c2df 100644 --- a/src/main/java/com/newscatcher/api/resources/searchbylink/requests/GetSearchByLinkRequest.java +++ b/src/main/java/com/newscatcher/api/resources/searchbylink/requests/GetSearchByLinkRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -61,7 +61,7 @@ private GetSearchByLinkRequest( * @return The Newscatcher article ID (corresponds to the _id field in API response) or a list of article IDs to search for. To specify multiple IDs, use a comma-separated string. *

Caution: You can use either the links or the ids parameter, but not both at the same time.

*/ - @JsonProperty("ids") + @JsonIgnore public Optional getIds() { return ids; } @@ -70,32 +70,32 @@ public Optional getIds() { * @return The article link or list of article links to search for. To specify multiple links, use a comma-separated string. *

Caution: You can use either the links or the ids parameter, but not both at the same time.

*/ - @JsonProperty("links") + @JsonIgnore public Optional getLinks() { return links; } - @JsonProperty("from_") + @JsonIgnore public Optional getFrom() { return from; } - @JsonProperty("to_") + @JsonIgnore public Optional getTo() { return to; } - @JsonProperty("page") + @JsonIgnore public Optional getPage() { return page; } - @JsonProperty("page_size") + @JsonIgnore public Optional getPageSize() { return pageSize; } - @JsonProperty("robots_compliant") + @JsonIgnore public Optional getRobotsCompliant() { return robotsCompliant; } diff --git a/src/main/java/com/newscatcher/api/resources/sources/requests/GetSourcesRequest.java b/src/main/java/com/newscatcher/api/resources/sources/requests/GetSourcesRequest.java index dc46b6d..c7c6e35 100644 --- a/src/main/java/com/newscatcher/api/resources/sources/requests/GetSourcesRequest.java +++ b/src/main/java/com/newscatcher/api/resources/sources/requests/GetSourcesRequest.java @@ -5,9 +5,9 @@ import com.fasterxml.jackson.annotation.JsonAnyGetter; import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonInclude; -import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonSetter; import com.fasterxml.jackson.annotation.Nulls; import com.fasterxml.jackson.databind.annotation.JsonDeserialize; @@ -76,7 +76,7 @@ private GetSourcesRequest( * @return The language(s) of the search. The only accepted format is the two-letter ISO 639-1 code. To select multiple languages, use a comma-separated string. *

To learn more, see Enumerated parameters > Language.

*/ - @JsonProperty("lang") + @JsonIgnore public Optional getLang() { return lang; } @@ -85,7 +85,7 @@ public Optional getLang() { * @return The countries where the news publisher is located. The accepted format is the two-letter ISO 3166-1 alpha-2 code. To select multiple countries, use a comma-separated string. *

To learn more, see Enumerated parameters > Country.

*/ - @JsonProperty("countries") + @JsonIgnore public Optional getCountries() { return countries; } @@ -95,7 +95,7 @@ public Optional getCountries() { *

Format: start with the word top, followed by the number of desired sources, and then the two-letter country code ISO 3166-1 alpha-2.

*

Multiple countries with the number of top sources can be specified as a comma-separated string.

*/ - @JsonProperty("predefined_sources") + @JsonIgnore public Optional getPredefinedSources() { return predefinedSources; } @@ -104,7 +104,7 @@ public Optional getPredefinedSources() { * @return Word or phrase to search within the source names. To specify multiple values, use a comma-separated string. *

Note: The search doesn't require an exact match and returns sources containing the specified terms in their names. You can use any word or phrase, like "sport" or "new york times". For example, "sport" returns sources such as "Motorsport", "Dot Esport", and "Tuttosport".

*/ - @JsonProperty("source_name") + @JsonIgnore public Optional getSourceName() { return sourceName; } @@ -114,22 +114,22 @@ public Optional getSourceName() { *

Caution: When specifying the source_url parameter, * you can only use include_additional_info as an extra parameter.

*/ - @JsonProperty("source_url") + @JsonIgnore public Optional getSourceUrl() { return sourceUrl; } - @JsonProperty("include_additional_info") + @JsonIgnore public Optional getIncludeAdditionalInfo() { return includeAdditionalInfo; } - @JsonProperty("is_news_domain") + @JsonIgnore public Optional getIsNewsDomain() { return isNewsDomain; } - @JsonProperty("news_domain_type") + @JsonIgnore public Optional getNewsDomainType() { return newsDomainType; } @@ -138,17 +138,17 @@ public Optional getNewsDomainType() { * @return Filters results based on the news type. Multiple types can be specified using a comma-separated string. *

For a complete list of available news types, see Enumerated parameters > News type.

*/ - @JsonProperty("news_type") + @JsonIgnore public Optional getNewsType() { return newsType; } - @JsonProperty("from_rank") + @JsonIgnore public Optional getFromRank() { return fromRank; } - @JsonProperty("to_rank") + @JsonIgnore public Optional getToRank() { return toRank; }