create method
Future<XRPCResponse<RepoCreateRecordOutput> >
create({
- required LabelerPolicies policies,
- ULabelerServiceLabels? labels,
- DateTime? createdAt,
- List<
ReasonType> ? reasonTypes, - List<
SubjectType> ? subjectTypes, - List<
String> ? subjectCollections, - String rkey = 'self',
- bool? validate,
- String? swapCommit,
- Map<
String, String> ? $headers, - Map<
String, String> ? $unknown,
Implementation
Future<XRPCResponse<RepoCreateRecordOutput>> create({
required LabelerPolicies policies,
ULabelerServiceLabels? labels,
DateTime? createdAt,
List<ReasonType>? reasonTypes,
List<SubjectType>? subjectTypes,
List<String>? subjectCollections,
String rkey = 'self',
bool? validate,
String? swapCommit,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
repo: _ctx.repo,
collection: ids.appBskyLabelerService,
rkey: rkey,
validate: validate,
record: {
...?$unknown,
'policies': policies.toJson(),
if (labels != null) 'labels': labels.toJson(),
'createdAt': iso8601(createdAt),
if (reasonTypes != null)
'reasonTypes': reasonTypes.map((e) => e.toJson()).toList(),
if (subjectTypes != null)
'subjectTypes': subjectTypes.map((e) => e.toJson()).toList(),
if (subjectCollections != null) 'subjectCollections': subjectCollections,
},
swapCommit: swapCommit,
$ctx: _ctx,
$headers: $headers,
);