love method
Love a track for a user profile.
Implementation
Future<bool> love({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': formatUnicode(text: track),
'artist': formatUnicode(text: artist),
};
final request = Request(
api: _api,
method: 'track.love',
parameters: parameters,
)..signRequest();
final response = PostResponseHelper.parse(
await request.send(mode: RequestMode.POST),
);
if (response.status) {
return true;
} else {
return false;
}
}