create method
Future<XRPCResponse<RepoCreateRecordOutput>>
create(
{ - required String uri,
- String? cid,
- required String val,
- required DateTime cts,
- DateTime? exp,
- String? rkey,
- bool? validate,
- String? swapCommit,
- Map<String, String>? $unknown,
})
Implementation
Future<XRPCResponse<RepoCreateRecordOutput>> create({
required String uri,
String? cid,
required String val,
required DateTime cts,
DateTime? exp,
String? rkey,
bool? validate,
String? swapCommit,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
repo: ctx.repo,
collection: ids.comAtprotoLabelRecord,
rkey: rkey,
validate: validate,
record: {
r'$type': 'com.atproto.label.record',
...?$unknown,
'uri': uri,
if (cid != null) 'cid': cid,
'val': val,
'cts': iso8601(cts),
if (exp != null) 'exp': iso8601(exp),
},
swapCommit: swapCommit,
$ctx: ctx,
$headers: $headers,
);