public static void main(
String[] args) {
try {
Discogs discogs = new Discogs();
String id = "3614";
Release release = discogs.getRelease(id);
if (release == null)
System.out.println("Release not found for id: " + id);
else {
System.out.println(release);
System.out.println("Title: " + release.getTitle());
System.out.println("Artist: " + release.getArtists().get(0).getName());
System.out.println("Tracks");
List<Track> tracks = release.getTracks();
for (int i = 0; i < tracks.size(); i++) {
Track curr = tracks.get(i);
System.out.println("\t" + (i + 1) + ": " + curr.getTitle());
}
}
Artist artist = discogs.getArtist("Richard H. Kirk", "Richard H Kirk");
System.out.println(artist);
Label label = discogs.getLabel("Warp Records");
System.out.println(label.getProfile());
// this fails on extended characters.
artist = discogs.getArtist("Stéphane Pompougnac");
System.out.println(artist.getProfile());
Search s = discogs.search(SEARCH_TYPE_ARTIST, "Stéphane Pompougnac");
System.out.println(s);
Release r = discogs.getRelease("507569");
System.out.println("Track name with UTF-8 char: " + r.getTracks().get(1).getTitle());
// System.out.println(r);
System.exit(0);
} catch (Exception e) {
e.printStackTrace();