class Search {

	public List<PlaylistEntity> searchforPlaylists(String searchItem, int limit) {
		SearchResult searchResult = this.spotifyAPICalls.searchInSpotify(searchItem, "playlist", limit);
		if (searchResult != null) {
			this.playlistSearchResults = createPlaylistData(searchResult.getPlaylists().getItems());
		} else {
			this.playlistSearchResults = new ArrayList<>();
		}
		return this.playlistSearchResults;
	}

}