followPlaylist method
playlistId
- the playlist ID
public
- Defaults to true
. If true
the playlist will be included
in user’s public playlists, if false
it will remain private.
Implementation
Future<void> followPlaylist(String playlistId, {bool public = true}) async {
final url = 'v1/playlists/$playlistId/followers';
final body = jsonEncode({'public': public});
await _api._put(url, body);
}