getReaction method
Future<ReactionBody>
getReaction(
- int fid,
- ReactionType reactionType,
- int? targetCastId,
- String? targetUrl,
Implementation
Future<ReactionBody> getReaction(
int fid,
ReactionType reactionType,
int? targetCastId,
String? targetUrl,
) async {
ReactionRequest request = ReactionRequest();
request.fid = $fixnum.Int64(fid);
request.reactionType = reactionType;
if (targetCastId != null) {
CastId castId = CastId();
castId.fid = $fixnum.Int64(targetCastId);
request.targetCastId = castId;
}
if (targetUrl != null) {
request.targetUrl = targetUrl;
}
Message response = await _hubService.hubClient.getReaction(request);
return response.data.reactionBody;
}