putRecord method

Future<XRPCResponse<StrongRef>> putRecord({
  1. required AtUri uri,
  2. required Map<String, dynamic> record,
  3. bool? validate,
  4. String? swapRecordCid,
  5. String? swapCommitCid,
})

Implementation

Future<core.XRPCResponse<StrongRef>> putRecord({
  required core.AtUri uri,
  required Map<String, dynamic> record,
  bool? validate,
  String? swapRecordCid,
  String? swapCommitCid,
}) async =>
    await _ctx.post(
      ns.comAtprotoRepoPutRecord,
      body: {
        'repo': _ctx.session?.did ?? _ctx.oAuthSession?.sub,
        'collection': uri.collection.toString(),
        'rkey': uri.rkey,
        'record': record,
        'validate': validate,
        'swapRecord': swapRecordCid,
        'swapCommit': swapCommitCid
      },
      to: StrongRef.fromJson,
    );