use of se.michaelthelin.spotify.model_objects.special.SnapshotResult in project spotify-web-api-java by spotify-web-api-java.
the class RemoveItemsFromPlaylistExample method removeItemsFromPlaylist_Sync.
public static void removeItemsFromPlaylist_Sync() {
try {
final SnapshotResult snapshotResult = removeItemsFromPlaylistRequest.execute();
System.out.println("Snapshot ID: " + snapshotResult.getSnapshotId());
} catch (IOException | SpotifyWebApiException | ParseException e) {
System.out.println("Error: " + e.getMessage());
}
}
use of se.michaelthelin.spotify.model_objects.special.SnapshotResult in project spotify-web-api-java by spotify-web-api-java.
the class AddItemsToPlaylistExample method addItemsToPlaylist_Sync.
public static void addItemsToPlaylist_Sync() {
try {
final SnapshotResult snapshotResult = addItemsToPlaylistRequest.execute();
System.out.println("Snapshot ID: " + snapshotResult.getSnapshotId());
} catch (IOException | SpotifyWebApiException | ParseException e) {
System.out.println("Error: " + e.getMessage());
}
}
use of se.michaelthelin.spotify.model_objects.special.SnapshotResult in project spotify-web-api-java by spotify-web-api-java.
the class AddItemsToPlaylistExample method addItemsToPlaylist_Async.
public static void addItemsToPlaylist_Async() {
try {
final CompletableFuture<SnapshotResult> snapshotResultFuture = addItemsToPlaylistRequest.executeAsync();
// Thread free to do other tasks...
// Example Only. Never block in production code.
final SnapshotResult snapshotResult = snapshotResultFuture.join();
System.out.println("Snapshot ID: " + snapshotResult.getSnapshotId());
} catch (CompletionException e) {
System.out.println("Error: " + e.getCause().getMessage());
} catch (CancellationException e) {
System.out.println("Async operation cancelled.");
}
}
use of se.michaelthelin.spotify.model_objects.special.SnapshotResult in project spotify-web-api-java by spotify-web-api-java.
the class RemoveItemsFromPlaylistExample method removeItemsFromPlaylist_Async.
public static void removeItemsFromPlaylist_Async() {
try {
final CompletableFuture<SnapshotResult> snapshotResultFuture = removeItemsFromPlaylistRequest.executeAsync();
// Thread free to do other tasks...
// Example Only. Never block in production code.
final SnapshotResult snapshotResult = snapshotResultFuture.join();
System.out.println("Snapshot ID: " + snapshotResult.getSnapshotId());
} catch (CompletionException e) {
System.out.println("Error: " + e.getCause().getMessage());
} catch (CancellationException e) {
System.out.println("Async operation cancelled.");
}
}
use of se.michaelthelin.spotify.model_objects.special.SnapshotResult in project spotify-web-api-java by spotify-web-api-java.
the class ReorderPlaylistsItemsExample method reorderPlaylistsItems_Async.
public static void reorderPlaylistsItems_Async() {
try {
final CompletableFuture<SnapshotResult> snapshotResultFuture = reorderPlaylistsItemsRequest.executeAsync();
// Thread free to do other tasks...
// Example Only. Never block in production code.
final SnapshotResult snapshotResult = snapshotResultFuture.join();
System.out.println("Snapshot ID: " + snapshotResult.getSnapshotId());
} catch (CompletionException e) {
System.out.println("Error: " + e.getCause().getMessage());
} catch (CancellationException e) {
System.out.println("Async operation cancelled.");
}
}
Aggregations