create method
Future<XRPCResponse<RepoCreateRecordOutput>>
create(
{ - required String url,
- String? title,
- Blob? icon,
- DateTime? createdAt,
- UActorLinkLabels? labels,
- String? rkey,
- bool? validate,
- String? swapCommit,
- Map<String, String>? $unknown,
})
Implementation
Future<XRPCResponse<RepoCreateRecordOutput>> create({
required String url,
String? title,
Blob? icon,
DateTime? createdAt,
UActorLinkLabels? labels,
String? rkey,
bool? validate,
String? swapCommit,
Map<String, String>? $headers,
Map<String, String>? $unknown,
}) async => await comAtprotoRepoCreateRecord(
repo: ctx.repo,
collection: ids.appBskyActorLink,
rkey: rkey,
validate: validate,
record: {
r'$type': 'app.bsky.actor.link',
...?$unknown,
'url': url,
if (title != null) 'title': title,
if (icon != null) 'icon': icon,
'createdAt': iso8601(createdAt),
if (labels != null) 'labels': labels.toJson(),
},
swapCommit: swapCommit,
$ctx: ctx,
$headers: $headers,
);