kaaes.spotify.webapi.android.models.ArtistSimple Java Examples
The following examples show how to use
kaaes.spotify.webapi.android.models.ArtistSimple.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TrackListData.java From Pasta-for-Spotify with Apache License 2.0 | 6 votes |
public TrackListData(final Track track) { this.trackName = track.name; this.albumName = track.album.name; this.albumId = track.album.id; if (track.album.images.size() > 0) { if (track.album.images.size() > 1) this.trackImage = track.album.images.get(1).url; else this.trackImage = track.album.images.get(0).url; this.trackImageLarge = track.album.images.get(0).url; } else { this.trackImage = ""; this.trackImageLarge = ""; } this.trackDuration = String.valueOf(track.duration_ms); artists = new ArrayList<>(); for (ArtistSimple artist : track.artists) { artists.add(new ArtistListData(artist)); } this.trackUri = track.uri; this.trackId = track.id; }
Example #2
Source File: TrackListData.java From Pasta-for-Spotify with Apache License 2.0 | 6 votes |
public TrackListData(final TrackSimple track, String albumName, String albumId, String trackImage, String trackImageLarge) { this.trackName = track.name; this.albumName = albumName; this.albumId = albumId; this.trackImage = trackImage; this.trackImageLarge = trackImageLarge; this.trackDuration = String.valueOf(track.duration_ms); artists = new ArrayList<>(); for (ArtistSimple artist : track.artists) { artists.add(new ArtistListData(artist)); } this.trackUri = track.uri; this.trackId = track.id; }
Example #3
Source File: SearchResultsAdapter.java From spotify-web-api-android with MIT License | 6 votes |
@Override public void onBindViewHolder(ViewHolder holder, int position) { Track item = mItems.get(position); holder.title.setText(item.name); List<String> names = new ArrayList<>(); for (ArtistSimple i : item.artists) { names.add(i.name); } Joiner joiner = Joiner.on(", "); holder.subtitle.setText(joiner.join(names)); Image image = item.album.images.get(0); if (image != null) { Picasso.with(mContext).load(image.url).into(holder.image); } }
Example #4
Source File: AlbumListData.java From Pasta-for-Spotify with Apache License 2.0 | 5 votes |
public AlbumListData(Album album) { albumName = album.name; albumId = album.id; albumDate = album.release_date; albumImage = album.images.get(1).url; albumImageLarge = album.images.get(0).url; artists = new ArrayList<>(); for (ArtistSimple artist : album.artists) { artists.add(new ArtistListData(artist)); } tracks = album.tracks.items.size(); }
Example #5
Source File: SpotifyFragment.java From mirror with Apache License 2.0 | 4 votes |
private static String artistNames(List<ArtistSimple> artists) { return stream(artists).map(a -> a.name).reduce((u, t) -> u + ", " + t).get(); }
Example #6
Source File: ArtistListData.java From Pasta-for-Spotify with Apache License 2.0 | 4 votes |
public ArtistListData(ArtistSimple artist) { artistName = artist.name; artistId = artist.id; }
Example #7
Source File: ParcelableModelsTest.java From spotify-web-api-android with MIT License | 4 votes |
ArrayList<Class<? extends Parcelable>> getModelClasses() { return Lists.newArrayList( Album.class, Albums.class, AlbumSimple.class, AlbumsPager.class, Artist.class, Artists.class, ArtistSimple.class, ArtistsPager.class, AudioFeaturesTrack.class, AudioFeaturesTracks.class, CategoriesPager.class, Category.class, Copyright.class, ErrorDetails.class, ErrorResponse.class, FeaturedPlaylists.class, Followers.class, Image.class, LinkedTrack.class, NewReleases.class, Playlist.class, PlaylistFollowPrivacy.class, PlaylistSimple.class, PlaylistsPager.class, PlaylistTrack.class, PlaylistTracksInformation.class, Recommendations.class, Result.class, Seed.class, SeedsGenres.class, SavedTrack.class, SnapshotId.class, Track.class, Tracks.class, TrackSimple.class, TracksPager.class, TrackToRemove.class, TrackToRemoveWithPosition.class, TracksToRemove.class, TracksToRemoveWithPosition.class, UserPrivate.class, UserPublic.class ); }