appBskyNotificationPutPreferencesV2 function
Future<XRPCResponse<NotificationPutPreferencesV2Output> >
appBskyNotificationPutPreferencesV2({
- ChatPreference? chat,
- FilterablePreference? follow,
- FilterablePreference? like,
- FilterablePreference? likeViaRepost,
- FilterablePreference? mention,
- FilterablePreference? quote,
- FilterablePreference? reply,
- FilterablePreference? repost,
- FilterablePreference? repostViaRepost,
- Preference? starterpackJoined,
- Preference? subscribedPost,
- Preference? unverified,
- Preference? verified,
- required ServiceContext $ctx,
- Map<
String, String> ? $headers, - Map<
String, String> ? $unknown,
Set notification-related preferences for an account. Requires auth.
Implementation
Future<XRPCResponse<NotificationPutPreferencesV2Output>>
appBskyNotificationPutPreferencesV2({
ChatPreference? chat,
FilterablePreference? follow,
FilterablePreference? like,
FilterablePreference? likeViaRepost,
FilterablePreference? mention,
FilterablePreference? quote,
FilterablePreference? reply,
FilterablePreference? repost,
FilterablePreference? repostViaRepost,
Preference? starterpackJoined,
Preference? subscribedPost,
Preference? unverified,
Preference? verified,
required ServiceContext $ctx,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.appBskyNotificationPutPreferencesV2,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
if (chat != null) 'chat': chat.toJson(),
if (follow != null) 'follow': follow.toJson(),
if (like != null) 'like': like.toJson(),
if (likeViaRepost != null) 'likeViaRepost': likeViaRepost.toJson(),
if (mention != null) 'mention': mention.toJson(),
if (quote != null) 'quote': quote.toJson(),
if (reply != null) 'reply': reply.toJson(),
if (repost != null) 'repost': repost.toJson(),
if (repostViaRepost != null) 'repostViaRepost': repostViaRepost.toJson(),
if (starterpackJoined != null)
'starterpackJoined': starterpackJoined.toJson(),
if (subscribedPost != null) 'subscribedPost': subscribedPost.toJson(),
if (unverified != null) 'unverified': unverified.toJson(),
if (verified != null) 'verified': verified.toJson(),
},
to: const NotificationPutPreferencesV2OutputConverter().fromJson,
);