create method

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  1. required AtUri post,
  2. List<UFeedThreadgateAllow>? allow,
  3. DateTime? createdAt,
  4. List<AtUri>? hiddenReplies,
  5. String? rkey,
  6. bool? validate,
  7. String? swapCommit,
  8. Map<String, String>? $headers,
  9. Map<String, String>? $unknown,
})

Implementation

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  required AtUri post,
  List<UFeedThreadgateAllow>? allow,
  DateTime? createdAt,
  List<AtUri>? hiddenReplies,
  String? rkey,
  bool? validate,
  String? swapCommit,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
  repo: _ctx.repo,
  collection: ids.appBskyFeedThreadgate,
  rkey: rkey,
  validate: validate,
  record: {
    ...?$unknown,
    'post': post.toString(),
    if (allow != null) 'allow': allow.map((e) => e.toJson()).toList(),
    'createdAt': iso8601(createdAt),
    if (hiddenReplies != null)
      'hiddenReplies': hiddenReplies.map((e) => e.toString()).toList(),
  },
  swapCommit: swapCommit,
  $ctx: _ctx,
  $headers: $headers,
);