Skip to content
This repository was archived by the owner on Jun 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions src/main/java/com/twingly/search/Query.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public class Query {
* Package-level constructor for API usage only. API users should use QueryBuilder instead.
*
* @see QueryBuilder
* @deprecated since 3.0.0 - use {@link #Query(Date, Date, String, String, String)} instead
* @deprecated since 1.1.0 - use {@link #Query(Date, Date, String, String, String)} instead
*/
@Deprecated
Query() {
Expand All @@ -40,7 +40,7 @@ public class Query {
* Gets language
*
* @return language
* @since 3.0.0
* @since 1.1.0
*/
public String getLang() {
return lang;
Expand All @@ -50,7 +50,7 @@ public String getLang() {
* Sets language
*
* @param lang language
* @since 3.0.0
* @since 1.1.0
*/
public void setLang(String lang) {
this.lang = lang;
Expand All @@ -60,7 +60,7 @@ public void setLang(String lang) {
* Convert current query object to #QueryBuilder.
*
* @return QueryBuilder object from current Query
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder toBuilder() {
return QueryBuilder.fromQuery(this);
Expand All @@ -70,7 +70,7 @@ public QueryBuilder toBuilder() {
* Gets location
*
* @return the location
* @since 3.0.0
* @since 1.1.0
*/
public String getLocation() {
return location;
Expand All @@ -80,7 +80,7 @@ public String getLocation() {
* Sets location
*
* @param location the location
* @since 3.0.0
* @since 1.1.0
*/
public void setLocation(String location) {
this.location = location;
Expand Down Expand Up @@ -166,7 +166,7 @@ public String toStringRepresentation() {
* Gets search pattern.
*
* @return the search pattern
* @deprecated since 3.0.0 - use {@link #getSearchQuery()} instead
* @deprecated since 1.1.0 - use {@link #getSearchQuery()} instead
*/
@Deprecated
public String getSearchPattern() {
Expand All @@ -177,7 +177,7 @@ public String getSearchPattern() {
* Sets search pattern.
*
* @param searchPattern the search pattern
* @deprecated since 3.0.0 - use {@link #setSearchQuery(String)} instead
* @deprecated since 1.1.0 - use {@link #setSearchQuery(String)} instead
*/
@Deprecated
public void setSearchPattern(String searchPattern) {
Expand All @@ -189,7 +189,7 @@ public void setSearchPattern(String searchPattern) {
* Gets document language.
*
* @return the document language
* @deprecated since 3.0.0 - use {@link #getLang()} instead
* @deprecated since 1.1.0 - use {@link #getLang()} instead
*/
@Deprecated
public String getDocumentLanguage() {
Expand All @@ -200,7 +200,7 @@ public String getDocumentLanguage() {
* Sets document language.
*
* @param documentLanguage the document language
* @deprecated since 3.0.0 - use {@link #setLang(String)} instead
* @deprecated since 1.1.0 - use {@link #setLang(String)} instead
*/
@Deprecated
public void setDocumentLanguage(String documentLanguage) {
Expand Down
22 changes: 11 additions & 11 deletions src/main/java/com/twingly/search/QueryBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static QueryBuilder create(String searchQuery) {
*
* @param query Query object to initialize builder with
* @return QueryBuilder with fields initialized from given query
* @since 3.0.0
* @since 1.1.0
*/
public static QueryBuilder fromQuery(Query query) {
return new QueryBuilder(query);
Expand All @@ -71,7 +71,7 @@ public QueryBuilder searchQuery(String searchQuery) {
*
* @param searchPattern the search pattern
* @return the query builder
* @deprecated since 3.0.0 use {@link #searchQuery(String)} instead
* @deprecated since 1.1.0 use {@link #searchQuery(String)} instead
*/
@Deprecated
public QueryBuilder searchPattern(String searchPattern) {
Expand All @@ -87,7 +87,7 @@ public QueryBuilder searchPattern(String searchPattern) {
*
* @param startTime the start time
* @return the query builder
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder startTime(Date startTime) {
if (startTime != null) {
Expand All @@ -107,7 +107,7 @@ public QueryBuilder startTime(Date startTime) {
*
* @param endTime the end time
* @return the query builder
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder endTime(Date endTime) {
if (endTime != null) {
Expand All @@ -130,7 +130,7 @@ public QueryBuilder endTime(Date endTime) {
*
* @param lang the language
* @return the query builder
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder lang(Language lang) {
if (lang != null) {
Expand All @@ -146,7 +146,7 @@ public QueryBuilder lang(Language lang) {
*
* @param language the language
* @return the query builder
* @deprecated since 3.0.0 - use {@link #lang(Language)} instead
* @deprecated since 1.1.0 - use {@link #lang(Language)} instead
*/
@Deprecated
public QueryBuilder documentLanguage(Language language) {
Expand All @@ -162,7 +162,7 @@ public QueryBuilder documentLanguage(Language language) {
*
* @param lang the language
* @return the query builder
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder lang(String lang) {
if (isNotEmpty(lang) && Language.fromIsoCode(lang) != null) {
Expand All @@ -178,7 +178,7 @@ public QueryBuilder lang(String lang) {
*
* @param documentLanguage the document language
* @return the query builder
* @deprecated since 3.0.0 - use {@link #lang(String)} instead
* @deprecated since 1.1.0 - use {@link #lang(String)} instead
*/
@Deprecated
public QueryBuilder documentLanguage(String documentLanguage) {
Expand All @@ -193,7 +193,7 @@ public QueryBuilder documentLanguage(String documentLanguage) {
*
* @param location the language
* @return the query builder
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder location(Location location) {
if (location != null) {
Expand All @@ -213,7 +213,7 @@ public QueryBuilder location(Location location) {
*
* @param location the language
* @return the query builder
* @since 3.0.0
* @since 1.1.0
*/
public QueryBuilder location(String location) {
if (isNotEmpty(location) && Location.fromIsoCode(location) != null) {
Expand All @@ -228,7 +228,7 @@ public QueryBuilder location(String location) {
* Create new query.
*
* @return the query builder
* @deprecated since 3.0.0 - use new QueryBuilder each time as current method can lead to empty {@link #searchQuery}
* @deprecated since 1.1.0 - use new QueryBuilder each time as current method can lead to empty {@link #searchQuery}
*/
@Deprecated
public QueryBuilder createNewQuery() {
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/com/twingly/search/client/Client.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,23 +41,23 @@ public interface Client {
* @param q query to perform request with
* @return Result object
* @throws TwinglySearchException if any exception happens
* @since 3.0.0
* @since 1.1.0
*/
Result makeRequest(String q);

/**
* Enables or disables compression
*
* @param value true in order to enable compressions or false in order to disable compressions
* @since 3.0.0
* @since 1.1.0
*/
void setIsCompressionEnabled(boolean value);

/**
* Checks whether compressions is enabled
*
* @return true if compressions is enabled - false otherwise
* @since 3.0.0
* @since 1.1.0
*/
boolean isCompressionEnabled();

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twingly/search/domain/BlogStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
/**
* The type Blog stream.
*
* @deprecated since 3.0.0
* @deprecated since 1.1.0
*/
@Deprecated
@XmlRootElement(name = "blogstream", namespace = "http://www.twingly.com")
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twingly/search/domain/ContentType.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Represents currently supported content types.
*
* @deprecated since 3.0.0
* @deprecated since 1.1.0
*/
@XmlType
@XmlEnum(String.class)
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twingly/search/domain/Coordinate.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* Geographical coordinates from blog post
*
* @since 3.0.0
* @since 1.1.0
*/
@XmlRootElement(name = "coordinates")
public class Coordinate {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twingly/search/domain/Error.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/**
* The type Error.
*
* @since 3.0.0
* @since 1.1.0
*/
@XmlRootElement(name = "error")
public class Error {
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/twingly/search/domain/Location.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This enum contain all supported by Twingly locations
*
* @see <a href="https://developer.twingly.com/resources/search-language/#supported-locations">Supported locations</a>
* @since 3.0.0
* @since 1.1.0
*/
public enum Location {
Andorra("ad"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
/**
* The type Operation failure messages.
*
* @deprecated since 3.0.0
* @deprecated since 1.1.0
*/
@Deprecated
public final class OperationFailureMessages {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* The type Operation result.
*
* @deprecated since 3.0.0
* @deprecated since 1.1.0
*/
@Deprecated
@XmlRootElement(name = "operationResult")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
/**
* The enum Operation result type.
*
* @deprecated since 3.0.0
* @deprecated since 1.1.0
*/
@XmlType
@XmlEnum(String.class)
Expand Down
Loading