Skip to content

Commit 7b3b3cc

Browse files
add include_external parameter in search requests
1 parent 5bf27fe commit 7b3b3cc

21 files changed

Lines changed: 126 additions & 7 deletions

‎examples/data/search/SearchItemExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public class SearchItemExample {
2424
// .market(CountryCode.SE)
2525
// .limit(10)
2626
// .offset(0)
27+
// .includeExternal("audio")
2728
.build();
2829

2930
public static void searchItem_Sync() {

‎examples/data/search/simplified/SearchAlbumsExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class SearchAlbumsExample {
2323
// .market(CountryCode.SE)
2424
// .limit(10)
2525
// .offset(0)
26+
// .includeExternal("audio")
2627
.build();
2728

2829
public static void searchAlbums_Sync() {

‎examples/data/search/simplified/SearchArtistsExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class SearchArtistsExample {
2323
// .market(CountryCode.SE)
2424
// .limit(10)
2525
// .offset(0)
26+
// .includeExternal("audio")
2627
.build();
2728

2829
public static void searchArtists_Sync() {

‎examples/data/search/simplified/SearchEpisodesExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class SearchEpisodesExample {
2323
// .market(CountryCode.SE)
2424
// .limit(10)
2525
// .offset(0)
26+
// .includeExternal("audio")
2627
.build();
2728

2829
public static void searchEpisodes_Sync() {

‎examples/data/search/simplified/SearchPlaylistsExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class SearchPlaylistsExample {
2323
// .market(CountryCode.SE)
2424
// .limit(10)
2525
// .offset(0)
26+
// .includeExternal("audio")
2627
.build();
2728

2829
public static void searchPlaylists_Sync() {

‎examples/data/search/simplified/SearchShowsExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class SearchShowsExample {
2323
// .market(CountryCode.SE)
2424
// .limit(10)
2525
// .offset(0)
26+
// .includeExternal("audio")
2627
.build();
2728

2829
public static void searchShows_Sync() {

‎examples/data/search/simplified/SearchTracksExample.java‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public class SearchTracksExample {
2323
// .market(CountryCode.SE)
2424
// .limit(10)
2525
// .offset(0)
26+
// .includeExternal("audio")
2627
.build();
2728

2829
public static void searchTracks_Sync() {

‎src/main/java/com/wrapper/spotify/requests/data/search/SearchItemRequest.java‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,20 @@ public Builder offset(final Integer offset) {
117117
return setQueryParameter("offset", offset);
118118
}
119119

120+
/**
121+
* The include external setter.
122+
*
123+
* @param includeExternal Optional. Possible values: {@code audio}. If {@code audio} is set
124+
* the response will include any relevant audio content that is hosted externally.
125+
* By default external content is filtered out from responses.
126+
* @return A {@link SearchItemRequest.Builder}.
127+
*/
128+
public Builder includeExternal(String includeExternal) {
129+
assert (includeExternal != null);
130+
assert (includeExternal.matches("audio"));
131+
return setQueryParameter("include_external", includeExternal);
132+
}
133+
120134
/**
121135
* The request build method.
122136
*

‎src/main/java/com/wrapper/spotify/requests/data/search/simplified/SearchAlbumsRequest.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.wrapper.spotify.model_objects.specification.Paging;
88
import com.wrapper.spotify.requests.data.AbstractDataPagingRequest;
99
import com.wrapper.spotify.requests.data.AbstractDataRequest;
10+
import com.wrapper.spotify.requests.data.search.SearchItemRequest;
1011
import org.apache.hc.core5.http.ParseException;
1112

1213
import java.io.IOException;
@@ -108,6 +109,20 @@ public Builder offset(final Integer offset) {
108109
return setQueryParameter("offset", offset);
109110
}
110111

112+
/**
113+
* The include external setter.
114+
*
115+
* @param includeExternal Optional. Possible values: {@code audio}. If {@code audio} is set
116+
* the response will include any relevant audio content that is hosted externally.
117+
* By default external content is filtered out from responses.
118+
* @return A {@link SearchItemRequest.Builder}.
119+
*/
120+
public Builder includeExternal(String includeExternal) {
121+
assert (includeExternal != null);
122+
assert (includeExternal.matches("audio"));
123+
return setQueryParameter("include_external", includeExternal);
124+
}
125+
111126
/**
112127
* The request build method.
113128
*

‎src/main/java/com/wrapper/spotify/requests/data/search/simplified/SearchArtistsRequest.java‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import com.wrapper.spotify.model_objects.specification.Paging;
88
import com.wrapper.spotify.requests.data.AbstractDataPagingRequest;
99
import com.wrapper.spotify.requests.data.AbstractDataRequest;
10+
import com.wrapper.spotify.requests.data.search.SearchItemRequest;
1011
import org.apache.hc.core5.http.ParseException;
1112

1213
import java.io.IOException;
@@ -108,6 +109,20 @@ public Builder offset(final Integer offset) {
108109
return setQueryParameter("offset", offset);
109110
}
110111

112+
/**
113+
* The include external setter.
114+
*
115+
* @param includeExternal Optional. Possible values: {@code audio}. If {@code audio} is set
116+
* the response will include any relevant audio content that is hosted externally.
117+
* By default external content is filtered out from responses.
118+
* @return A {@link SearchItemRequest.Builder}.
119+
*/
120+
public Builder includeExternal(String includeExternal) {
121+
assert (includeExternal != null);
122+
assert (includeExternal.matches("audio"));
123+
return setQueryParameter("include_external", includeExternal);
124+
}
125+
111126
/**
112127
* The request build method.
113128
*

0 commit comments

Comments
 (0)