|
3 | 3 | import java.util.Map;
|
4 | 4 |
|
5 | 5 | import kaaes.spotify.webapi.android.annotations.DELETEWITHBODY;
|
6 |
| -import kaaes.spotify.webapi.android.models.*; |
| 6 | +import kaaes.spotify.webapi.android.models.Album; |
| 7 | +import kaaes.spotify.webapi.android.models.Albums; |
| 8 | +import kaaes.spotify.webapi.android.models.AlbumsPager; |
| 9 | +import kaaes.spotify.webapi.android.models.Artist; |
| 10 | +import kaaes.spotify.webapi.android.models.Artists; |
| 11 | +import kaaes.spotify.webapi.android.models.ArtistsCursorPager; |
| 12 | +import kaaes.spotify.webapi.android.models.ArtistsPager; |
| 13 | +import kaaes.spotify.webapi.android.models.CategoriesPager; |
| 14 | +import kaaes.spotify.webapi.android.models.Category; |
| 15 | +import kaaes.spotify.webapi.android.models.FeaturedPlaylists; |
| 16 | +import kaaes.spotify.webapi.android.models.NewReleases; |
| 17 | +import kaaes.spotify.webapi.android.models.Pager; |
| 18 | +import kaaes.spotify.webapi.android.models.Playlist; |
| 19 | +import kaaes.spotify.webapi.android.models.PlaylistFollowPrivacy; |
| 20 | +import kaaes.spotify.webapi.android.models.PlaylistSimple; |
| 21 | +import kaaes.spotify.webapi.android.models.PlaylistTrack; |
| 22 | +import kaaes.spotify.webapi.android.models.PlaylistsPager; |
| 23 | +import kaaes.spotify.webapi.android.models.Result; |
| 24 | +import kaaes.spotify.webapi.android.models.SavedAlbum; |
| 25 | +import kaaes.spotify.webapi.android.models.SavedTrack; |
| 26 | +import kaaes.spotify.webapi.android.models.SnapshotId; |
| 27 | +import kaaes.spotify.webapi.android.models.Track; |
| 28 | +import kaaes.spotify.webapi.android.models.Tracks; |
| 29 | +import kaaes.spotify.webapi.android.models.TracksPager; |
| 30 | +import kaaes.spotify.webapi.android.models.TracksToRemove; |
| 31 | +import kaaes.spotify.webapi.android.models.TracksToRemoveWithPosition; |
| 32 | +import kaaes.spotify.webapi.android.models.UserPrivate; |
| 33 | +import kaaes.spotify.webapi.android.models.UserPublic; |
7 | 34 | import retrofit.Callback;
|
8 | 35 | import retrofit.http.Body;
|
9 | 36 | import retrofit.http.DELETE;
|
@@ -1110,6 +1137,105 @@ public interface SpotifyService {
|
1110 | 1137 | @DELETE("/me/tracks")
|
1111 | 1138 | Result removeFromMySavedTracks(@Query("ids") String ids);
|
1112 | 1139 |
|
| 1140 | + /** |
| 1141 | + * Get a list of the albums saved in the current Spotify user’s “Your Music” library. |
| 1142 | + * |
| 1143 | + * @param callback Callback method. |
| 1144 | + * @see <a href="https://developer.spotify.com/web-api/get-users-saved-albums/">Get a User’s Saved Albums</a> |
| 1145 | + */ |
| 1146 | + @GET("/me/albums") |
| 1147 | + void getMySavedAlbums(Callback<Pager<SavedAlbum>> callback); |
| 1148 | + |
| 1149 | + /** |
| 1150 | + * Get a list of the albums saved in the current Spotify user’s “Your Music” library. |
| 1151 | + * |
| 1152 | + * @return A paginated list of saved albums |
| 1153 | + * @see <a href="https://developer.spotify.com/web-api/get-users-saved-albums/">Get a User’s Saved Albums</a> |
| 1154 | + */ |
| 1155 | + @GET("/me/albums") |
| 1156 | + Pager<SavedAlbum> getMySavedAlbums(); |
| 1157 | + |
| 1158 | + /** |
| 1159 | + * Get a list of the albums saved in the current Spotify user’s “Your Music” library. |
| 1160 | + * |
| 1161 | + * @param options Optional parameters. For list of supported parameters see |
| 1162 | + * <a href="https://developer.spotify.com/web-api/get-users-saved-albums/">endpoint documentation</a> |
| 1163 | + * @param callback Callback method. |
| 1164 | + * @see <a href="https://developer.spotify.com/web-api/get-users-saved-albums/">Get a User’s Saved Albums</a> |
| 1165 | + */ |
| 1166 | + @GET("/me/albums") |
| 1167 | + void getMySavedAlbums(@QueryMap Map<String, Object> options, Callback<Pager<SavedAlbum>> callback); |
| 1168 | + |
| 1169 | + /** |
| 1170 | + * Get a list of the albums saved in the current Spotify user’s “Your Music” library. |
| 1171 | + * |
| 1172 | + * @param options Optional parameters. For list of supported parameters see |
| 1173 | + * <a href="https://developer.spotify.com/web-api/get-users-saved-albums/">endpoint documentation</a> |
| 1174 | + * @return A paginated list of saved albums |
| 1175 | + * @see <a href="https://developer.spotify.com/web-api/get-users-saved-albums/">Get a User’s Saved Albums</a> |
| 1176 | + */ |
| 1177 | + @GET("/me/albums") |
| 1178 | + Pager<SavedAlbum> getMySavedAlbums(@QueryMap Map<String, Object> options); |
| 1179 | + |
| 1180 | + /** |
| 1181 | + * Check if one or more albums is already saved in the current Spotify user’s “Your Music” library. |
| 1182 | + * |
| 1183 | + * @param ids A comma-separated list of the Spotify IDs for the albums |
| 1184 | + * @param callback Callback method. |
| 1185 | + * @see <a href="https://developer.spotify.com/web-api/check-users-saved-albums/">Check User’s Saved Albums</a> |
| 1186 | + */ |
| 1187 | + @GET("/me/albums/contains") |
| 1188 | + void containsMySavedAlbums(@Query("ids") String ids, Callback<boolean[]> callback); |
| 1189 | + |
| 1190 | + /** |
| 1191 | + * Check if one or more albums is already saved in the current Spotify user’s “Your Music” library. |
| 1192 | + * |
| 1193 | + * @param ids A comma-separated list of the Spotify IDs for the albums |
| 1194 | + * @return An array with boolean values that indicate whether the albums are in the current Spotify user’s “Your Music” library. |
| 1195 | + * @see <a href="https://developer.spotify.com/web-api/check-users-saved-albums/">Check User’s Saved Albums</a> |
| 1196 | + */ |
| 1197 | + @GET("/me/albums/contains") |
| 1198 | + Boolean[] containsMySavedAlbums(@Query("ids") String ids); |
| 1199 | + |
| 1200 | + /** |
| 1201 | + * Save one or more albums to the current user’s “Your Music” library. |
| 1202 | + * |
| 1203 | + * @param ids A comma-separated list of the Spotify IDs for the albums |
| 1204 | + * @param callback Callback method. |
| 1205 | + * @see <a href="https://developer.spotify.com/web-api/save-albums-user/">Save Albums for User</a> |
| 1206 | + */ |
| 1207 | + @PUT("/me/albums") |
| 1208 | + void addToMySavedAlbums(@Query("ids") String ids, Callback<Object> callback); |
| 1209 | + |
| 1210 | + /** |
| 1211 | + * Save one or more albums to the current user’s “Your Music” library. |
| 1212 | + * |
| 1213 | + * @param ids A comma-separated list of the Spotify IDs for the albums |
| 1214 | + * @return An empty result |
| 1215 | + * @see <a href="https://developer.spotify.com/web-api/save-albums-user/">Save Albums for User</a> |
| 1216 | + */ |
| 1217 | + @PUT("/me/albums") |
| 1218 | + Result addToMySavedAlbums(@Query("ids") String ids); |
| 1219 | + |
| 1220 | + /** |
| 1221 | + * Remove one or more albums from the current user’s “Your Music” library. |
| 1222 | + * |
| 1223 | + * @param ids A comma-separated list of the Spotify IDs for the albums |
| 1224 | + * @param callback Callback method. |
| 1225 | + * @see <a href="https://developer.spotify.com/web-api/remove-albums-user/">Remove User’s Saved Albums</a> |
| 1226 | + */ |
| 1227 | + @DELETE("/me/albums") |
| 1228 | + void removeFromMySavedAlbums(@Query("ids") String ids, Callback<Object> callback); |
| 1229 | + |
| 1230 | + /** |
| 1231 | + * Remove one or more albums from the current user’s “Your Music” library. |
| 1232 | + * |
| 1233 | + * @param ids A comma-separated list of the Spotify IDs for the albums |
| 1234 | + * @return An empty result |
| 1235 | + * @see <a href="https://developer.spotify.com/web-api/remove-albums-user/">Remove User’s Saved Albums</a> |
| 1236 | + */ |
| 1237 | + @DELETE("/me/albums") |
| 1238 | + Result removeFromMySavedAlbums(@Query("ids") String ids); |
1113 | 1239 |
|
1114 | 1240 | /**********
|
1115 | 1241 | * Follow *
|
|
0 commit comments