friendshipsUpdate method
Future<Relationship>
friendshipsUpdate({
- String? screenName,
- String? userId,
- bool? device,
- bool? retweets,
- TransformResponse<
Relationship> transform = defaultRelationshipTransform,
Enable or disable Retweets and device notifications from the specified user.
screenName
: The screen name of the user being followed.
userId
: The ID of the user being followed.
device
: Turn on/off device notifications from the target user.
retweets
: Turn on/off Retweets from the target user.
transform
: Can be used to parse the request. By default, the response is
parsed in an isolate.
Implementation
Future<Relationship> friendshipsUpdate({
String? screenName,
String? userId,
bool? device,
bool? retweets,
TransformResponse<Relationship> transform = defaultRelationshipTransform,
}) async {
final body = <String, String>{}
..addParameter('screen_name', screenName)
..addParameter('user_id', userId)
..addParameter('device', device)
..addParameter('retweets', retweets);
return client
.post(
Uri.https('api.twitter.com', '1.1/friendships/update.json'),
body: body,
)
.then(transform);
}