unLove method

Future<bool> unLove({
  1. required String track,
  2. required String artist,
})

UnLove a track for a user profile.

https://www.last.fm/api/show/track.unlove

Implementation

Future<bool> unLove({required String track, required String artist}) async {
  if (!_api.isAuth) {
    return Future.error(
      ScrobblenautException(
        description: "You can't use this method unless you Authenticate.",
      ),
    );
  }

  final parameters = {'track': track, 'artist': artist};

  final request = Request(
    api: _api,
    method: 'track.unlove',
    parameters: parameters,
  )..signRequest();

  final response = PostResponseHelper.parse(
    await request.send(mode: RequestMode.POST),
  );

  if (response.status) {
    return true;
  } else {
    return false;
  }
}