Class SearchResult
java.lang.Object
se.michaelthelin.spotify.model_objects.AbstractModelObject
se.michaelthelin.spotify.model_objects.special.SearchResult
- All Implemented Interfaces:
Serializable, IModelObject, ISearchModelObject, IArtistTrackModelObject
public class SearchResult
extends AbstractModelObject
implements IArtistTrackModelObject, ISearchModelObject
Retrieve the searched-for items by building instances from this class. This object contains
for every type specified by the
type parameter in the SearchForItemRequest
the searched-for items wrapped in a Paging object.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classBuilder class for buildingSearchResultinstances.static final classJsonUtil class for buildingSearchResultinstances.Nested classes/interfaces inherited from interface IModelObject
IModelObject.IJsonUtil<T> -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Create a builder for building an instance of a model object.Get the album objects contained in the search result object.Get the artist objects contained in the search result object.Get the audiobook objects contained in the search result object.Get the episode objects contained in the search result object.Get the playlist objects contained in the search result object.getShows()Get the show objects contained in the search result object.Get the track objects contained in the search result object.toString()Returns a String representation of this model object in the style:
-
Method Details
-
getAlbums
Get the album objects contained in the search result object.
Note: The search result only contains album objects when thealbumparameter has been specified in the request.- Returns:
- Albums from the search result.
-
getArtists
-
getAudiobooks
Get the audiobook objects contained in the search result object.
Note: The search result only contains audiobook objects when theaudiobookparameter has been specified in the request.- Returns:
- Audiobooks from the search result.
-
getEpisodes
Get the episode objects contained in the search result object.
Note: The search result only contains episode objects when theepisodeparameter has been specified in the request.- Returns:
- Episodes from the search result.
-
getPlaylists
Get the playlist objects contained in the search result object.
Note: The search result only contains playlist objects when theplaylistparameter has been specified in the request.- Returns:
- Playlists from the search result.
-
getShows
Get the show objects contained in the search result object.
Note: The search result only contains show objects when theshowparameter has been specified in the request.- Returns:
- Shows from the search result.
-
getTracks
-
toString
Description copied from class:AbstractModelObjectReturns a String representation of this model object in the style:ModelObject(attr1=value1, attr2=value2, ...)- Specified by:
toStringin classAbstractModelObject
-
builder
Description copied from interface:IModelObjectCreate a builder for building an instance of a model object.
The type of the builder and its methods depend on its corresponding implementation.- Specified by:
builderin interfaceIModelObject- Returns:
- A builder object.
-