addTracksToPlaylist method
Adds a list of track URIs to a playlist identified by playlistId.
If position is provided, tracks are inserted at that position.
Implementation
Future<void> addTracksToPlaylist(
String playlistId,
List<String> trackUris, {
int? position,
}) async {
final uri = Uri.https(_baseApiHost, '/v1/playlists/$playlistId/tracks');
final body = {
'uris': trackUris,
if (position != null) 'position': position,
};
await _postJson(uri, body);
}