use of org.apache.hc.core5.http.ParseException in project spotify-web-api-java by spotify-web-api-java.
the class GetInformationAboutUsersCurrentPlaybackExample method getInformationAboutUsersCurrentPlayback_Sync.
public static void getInformationAboutUsersCurrentPlayback_Sync() {
try {
final CurrentlyPlayingContext currentlyPlayingContext = getInformationAboutUsersCurrentPlaybackRequest.execute();
System.out.println("Timestamp: " + currentlyPlayingContext.getTimestamp());
} catch (IOException | SpotifyWebApiException | ParseException e) {
System.out.println("Error: " + e.getMessage());
}
}
use of org.apache.hc.core5.http.ParseException 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 org.apache.hc.core5.http.ParseException in project spotify-web-api-java by spotify-web-api-java.
the class CreatePlaylistExample method createPlaylist_Sync.
public static void createPlaylist_Sync() {
try {
final Playlist playlist = createPlaylistRequest.execute();
System.out.println("Name: " + playlist.getName());
} catch (IOException | SpotifyWebApiException | ParseException e) {
System.out.println("Error: " + e.getMessage());
}
}
use of org.apache.hc.core5.http.ParseException in project spotify-web-api-java by spotify-web-api-java.
the class GetListOfFeaturedPlaylistsExample method getListOfFeaturedPlaylists_Sync.
public static void getListOfFeaturedPlaylists_Sync() {
try {
final FeaturedPlaylists featuredPlaylists = getListOfFeaturedPlaylistsRequest.execute();
System.out.println("Message: " + featuredPlaylists.getMessage());
} catch (IOException | SpotifyWebApiException | ParseException e) {
System.out.println("Error: " + e.getMessage());
}
}
use of org.apache.hc.core5.http.ParseException in project spotify-web-api-java by spotify-web-api-java.
the class GetRecommendationsExample method getRecommendations_Sync.
public static void getRecommendations_Sync() {
try {
final Recommendations recommendations = getRecommendationsRequest.execute();
System.out.println("Length: " + recommendations.getTracks().length);
} catch (IOException | SpotifyWebApiException | ParseException e) {
System.out.println("Error: " + e.getMessage());
}
}
Aggregations