putRecord method
Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.
https://atprotodart.com/docs/lexicons/com/atproto/repo/putRecord
Implementation
Future<XRPCResponse<PutRecordOutput>> putRecord({
String? repo,
required NSID collection,
required String rkey,
bool? validate,
required Map<String, dynamic> record,
String? swapRecord,
String? swapCommit,
Map<String, String>? $unknown,
Map<String, String>? $headers,
PostClient? $client,
}) async =>
await _ctx.post<PutRecordOutput>(
ns.comAtprotoRepoPutRecord,
headers: $headers,
body: {
'repo': repo ?? _ctx.repo,
'collection': collection.toString(),
'rkey': rkey,
if (validate != null) 'validate': validate,
'record': record,
if (swapRecord != null) 'swapRecord': swapRecord,
if (swapCommit != null) 'swapCommit': swapCommit,
...?$unknown,
},
to: const PutRecordOutputConverter().fromJson,
client: $client,
);