create method

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  1. required String uri,
  2. String? cid,
  3. required String val,
  4. required DateTime cts,
  5. DateTime? exp,
  6. String? rkey,
  7. bool? validate,
  8. String? swapCommit,
  9. Map<String, String>? $headers,
  10. 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,
);