If you are interested in the user's playlists, you can do it like this:
var returnedLibrary;
require(['$api/library#Library'], function(Library) {
returnedLibrary = Library.forCurrentUser();
returnedLibrary.playlists.snapshot().done(function(snapshot) {
for (var i = 0, l = snapshot.length; i < l; i++) {
var playlist = snapshot.get(i);
// do something with playlist
}
});
});