unlikeNoteForUser function
Attempts to unlike a note. If the operation succeeds, a success map is returned. If the operation fails, an error map is returned. You can customize which reaction you want to reverse.
Implementation
Future<Map<String,dynamic>> unlikeNoteForUser(
String apiBase,
String baseUrl,
String apiToken,
String noteId,
String reaction
) async {
String reqUrl = '$baseUrl$apiBase/notes/reactions/delete';
Map<String,dynamic> headers = new Map();
headers['Content-Type'] = 'application/json';
Map<String,dynamic> payload = new Map();
payload['i'] = apiToken;
payload['noteId'] = noteId;
payload['reaction'] = reaction;
Map<String,dynamic> postRequest = await fetchJSON(
'POST',
headers,
payload,
reqUrl
);
return postRequest;
}