create method
Future<XRPCResponse<RepoCreateRecordOutput>>
create(
{ - required String name,
- String? description,
- List<RichtextFacet>? descriptionFacets,
- required AtUri list,
- List<FeedItem>? feeds,
- DateTime? createdAt,
- String? rkey,
- bool? validate,
- String? swapCommit,
- Map<String, String>? $unknown,
})
Implementation
Future<XRPCResponse<RepoCreateRecordOutput>> create({
required String name,
String? description,
List<RichtextFacet>? descriptionFacets,
required AtUri list,
List<FeedItem>? feeds,
DateTime? createdAt,
String? rkey,
bool? validate,
String? swapCommit,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
repo: _ctx.repo,
collection: ids.appBskyGraphStarterpack,
rkey: rkey,
validate: validate,
record: {
...?$unknown,
'name': name,
if (description != null) 'description': description,
if (descriptionFacets != null)
'descriptionFacets': descriptionFacets.map((e) => e.toJson()).toList(),
'list': list.toString(),
if (feeds != null) 'feeds': feeds.map((e) => e.toJson()).toList(),
'createdAt': iso8601(createdAt),
},
swapCommit: swapCommit,
$ctx: _ctx,
$headers: $headers,
);