add method
Add a Redditor to this relationship.
redditor
can be either an instance of Redditor or the name of a
Redditor.
Implementation
Future<void> add(/* String, Redditor */ redditor,
{Map<String, String>? params}) async {
final data = {
'name': _redditorNameHelper(redditor),
'type': relationship,
};
if (params != null) {
data.addAll(params);
}
await _subreddit.reddit.post(
apiPath['friend']
.replaceAll(SubredditRef._subredditRegExp, _subreddit.displayName),
data,
discardResponse: true);
}