switchCommenterControl method
Future<void>
switchCommenterControl(
)
Implementation
Future<void> switchCommenterControl(IGCommenterControl control) async {
String audienceControl;
switch (control) {
case IGCommenterControl.Uncaught:
case IGCommenterControl.Any:
audienceControl = "any";
break;
case IGCommenterControl.FollowingAndFollower:
audienceControl = "following_and_follower";
break;
case IGCommenterControl.Following:
audienceControl = "following";
break;
case IGCommenterControl.Follower:
audienceControl = "follower";
break;
}
final body = {
"_csrftoken": _csrftoken,
"_uuid": _deviceId,
"_uid": _userId,
"audience_control": audienceControl
};
return (await _apiNet.postSignedJson(
"/accounts/set_comment_audience_control_type", body,
action: IGAPIAction.AccountCommenterControlSwitch))
.tuple0();
}