applyWrites method
Apply a batch transaction of repository creates, updates, and deletes. Requires auth, implemented by PDS.
https://atprotodart.com/docs/lexicons/com/atproto/repo/applyWrites
Implementation
Future<XRPCResponse<ApplyWritesOutput>> applyWrites({
String? repo,
bool? validate,
required List<UApplyWritesWrite> writes,
String? swapCommit,
Map<String, String>? $unknown,
Map<String, String>? $headers,
PostClient? $client,
}) async =>
await _ctx.post<ApplyWritesOutput>(
ns.comAtprotoRepoApplyWrites,
headers: $headers,
body: {
'repo': repo ?? _ctx.repo,
if (validate != null) 'validate': validate,
'writes': writes.map((e) => e.toJson()).toList(),
if (swapCommit != null) 'swapCommit': swapCommit,
...?$unknown,
},
to: const ApplyWritesOutputConverter().fromJson,
client: $client,
);