create method

Future<XRPCResponse<RepoCreateRecordOutput>> create({
  1. required String did,
  2. required String displayName,
  3. String? description,
  4. List<RichtextFacet>? descriptionFacets,
  5. Blob? avatar,
  6. bool? acceptsInteractions,
  7. UFeedGeneratorLabels? labels,
  8. FeedGeneratorContentMode? contentMode,
  9. DateTime? createdAt,
  10. String? rkey,
  11. bool? validate,
  12. String? swapCommit,
  13. Map<String, String>? $headers,
  14. 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,
);