comAtprotoRepoPutRecord function
Write a repository record, creating or updating it as needed. Requires auth, implemented by PDS.
Implementation
Future<XRPCResponse<RepoPutRecordOutput>> comAtprotoRepoPutRecord({
required String repo,
required String collection,
required String rkey,
bool? validate,
required Map<String, dynamic> record,
String? swapRecord,
String? swapCommit,
required ServiceContext $ctx,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await $ctx.post(
ns.comAtprotoRepoPutRecord,
headers: {'Content-type': 'application/json', ...?$headers},
body: {
...?$unknown,
'repo': repo,
'collection': collection,
'rkey': rkey,
if (validate != null) 'validate': validate,
'record': record,
if (swapRecord != null) 'swapRecord': swapRecord,
if (swapCommit != null) 'swapCommit': swapCommit,
},
to: const RepoPutRecordOutputConverter().fromJson,
);