kaaes.spotify.webapi.android.models.NewReleases Java Examples
The following examples show how to use
kaaes.spotify.webapi.android.models.NewReleases.
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: SpotifyServiceTest.java From spotify-web-api-android with MIT License | 5 votes |
@Test public void shouldGetNewReleases() throws IOException { final String countryId = "SE"; final int limit = 5; String body = TestUtils.readTestData("new-releases.json"); NewReleases fixture = mGson.fromJson(body, NewReleases.class); Response response = TestUtils.getResponseFromModel(fixture, NewReleases.class); when(mMockClient.execute(argThat(new ArgumentMatcher<Request>() { @Override public boolean matches(Object argument) { try { return ((Request) argument).getUrl().contains("limit=" + limit) && ((Request) argument).getUrl().contains("country=" + URLEncoder.encode(countryId, "UTF-8")); } catch (UnsupportedEncodingException e) { return false; } } }))).thenReturn(response); Map<String, Object> options = new HashMap<String, Object>(); options.put(SpotifyService.COUNTRY, countryId); options.put(SpotifyService.OFFSET, 0); options.put(SpotifyService.LIMIT, limit); NewReleases newReleases = mSpotifyService.getNewReleases(options); this.compareJSONWithoutNulls(body, newReleases); }
Example #2
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 ); }
Example #3
Source File: SpotifyService.java From spotify-web-api-android with MIT License | 2 votes |
/** * Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). * * @param callback Callback method * @see <a href="https://developer.spotify.com/web-api/get-list-new-releases/">Get a List of New Releases</a> */ @GET("/browse/new-releases") void getNewReleases(Callback<NewReleases> callback);
Example #4
Source File: SpotifyService.java From spotify-web-api-android with MIT License | 2 votes |
/** * Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). * * @return A NewReleases object with the new album releases * @see <a href="https://developer.spotify.com/web-api/get-list-new-releases/">Get a List of New Releases</a> */ @GET("/browse/new-releases") NewReleases getNewReleases();
Example #5
Source File: SpotifyService.java From spotify-web-api-android with MIT License | 2 votes |
/** * Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). * * @param options Optional parameters. For list of supported parameters see * <a href="https://developer.spotify.com/web-api/get-list-new-releases/">endpoint documentation</a> * @param callback Callback method * @see <a href="https://developer.spotify.com/web-api/get-list-new-releases/">Get a List of New Releases</a> */ @GET("/browse/new-releases") void getNewReleases(@QueryMap Map<String, Object> options, Callback<NewReleases> callback);
Example #6
Source File: SpotifyService.java From spotify-web-api-android with MIT License | 2 votes |
/** * Get a list of new album releases featured in Spotify (shown, for example, on a Spotify player’s “Browse” tab). * * @param options Optional parameters. For list of supported parameters see * <a href="https://developer.spotify.com/web-api/get-list-new-releases/">endpoint documentation</a> * @return A NewReleases object with the new album releases * @see <a href="https://developer.spotify.com/web-api/get-list-new-releases/">Get a List of New Releases</a> */ @GET("/browse/new-releases") NewReleases getNewReleases(@QueryMap Map<String, Object> options);