create method
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>? $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,
);