create method
Future<XRPCResponse<RepoCreateRecordOutput> >
create({
- required String did,
- required String displayName,
- String? description,
- List<
RichtextFacet> ? descriptionFacets, - Blob? avatar,
- bool? acceptsInteractions,
- UFeedGeneratorLabels? labels,
- FeedGeneratorContentMode? contentMode,
- DateTime? createdAt,
- String? rkey,
- bool? validate,
- String? swapCommit,
- Map<
String, String> ? $headers, - Map<
String, String> ? $unknown,
Implementation
Future<XRPCResponse<RepoCreateRecordOutput>> create({
required String did,
required String displayName,
String? description,
List<RichtextFacet>? descriptionFacets,
Blob? avatar,
bool? acceptsInteractions,
UFeedGeneratorLabels? labels,
FeedGeneratorContentMode? contentMode,
DateTime? createdAt,
String? rkey,
bool? validate,
String? swapCommit,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
repo: _ctx.repo,
collection: ids.appBskyFeedGenerator,
rkey: rkey,
validate: validate,
record: {
...?$unknown,
'did': did,
'displayName': displayName,
if (description != null) 'description': description,
if (descriptionFacets != null)
'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(),
if (avatar != null) 'avatar': avatar,
if (acceptsInteractions != null)
'acceptsInteractions': acceptsInteractions,
if (labels != null) 'labels': labels.toJson(),
if (contentMode != null) 'contentMode': contentMode.toJson(),
'createdAt': iso8601(createdAt),
},
swapCommit: swapCommit,
$ctx: _ctx,
$headers: $headers,
);