updatePlaylistDetails method
Updates details of an existing playlist identified by playlistId.
Optional parameters can update the name, description, visibility, and collaboration status.
Implementation
Future<void> updatePlaylistDetails(
String playlistId, {
String? name,
String? description,
bool? isPublic,
bool? collaborative,
}) async {
final uri = Uri.https(_baseApiHost, '/v1/playlists/$playlistId');
final body = <String, dynamic>{
if (name != null) 'name': name,
if (description != null) 'description': description,
if (isPublic != null) 'public': isPublic,
if (collaborative != null) 'collaborative': collaborative,
};
await _putJson(uri, body);
}