francesco-n
4/17/2014 - 12:32 PM

Get list of playlist of spotify

Get list of playlist of spotify

    id plistRep = [[NSUserDefaults standardUserDefaults] valueForKey:@"SpotifySession"];
	  SPTSession *session = [[SPTSession alloc] initWithPropertyListRepresentation:plistRep];
    [SPTRequest playlistsForUser:[session canonicalUsername] withSession:session callback:^(NSError *error, id object) {
        SPTPlaylistList *playlist = (SPTPlaylistList *)object;
        for (SPTPartialPlaylist *item in [playlist items]) {
            NSLog(@"Playlist %@", [item name]);
        }
        
    }];