create method

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  1. required String text,
  2. List<RichtextFacet>? facets,
  3. ReplyRef? reply,
  4. UFeedPostEmbed? embed,
  5. List<String>? langs,
  6. UFeedPostLabels? labels,
  7. List<String>? tags,
  8. DateTime? createdAt,
  9. String? rkey,
  10. bool? validate,
  11. String? swapCommit,
  12. Map<String, String>? $headers,
  13. Map<String, String>? $unknown,
})

Implementation

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  required String text,
  List<RichtextFacet>? facets,
  ReplyRef? reply,
  UFeedPostEmbed? embed,
  List<String>? langs,
  UFeedPostLabels? labels,
  List<String>? tags,
  DateTime? createdAt,
  String? rkey,
  bool? validate,
  String? swapCommit,
  Map<String, String>? $headers,
  Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
  repo: _ctx.repo,
  collection: ids.appBskyFeedPost,
  rkey: rkey,
  validate: validate,
  record: {
    ...?$unknown,
    'text': text,
    if (facets != null) 'facets': facets.map((e) => e.toJson()).toList(),
    if (reply != null) 'reply': reply.toJson(),
    if (embed != null) 'embed': embed.toJson(),
    if (langs != null) 'langs': langs,
    if (labels != null) 'labels': labels.toJson(),
    if (tags != null) 'tags': tags,
    'createdAt': iso8601(createdAt),
  },
  swapCommit: swapCommit,
  $ctx: _ctx,
  $headers: $headers,
);