deleteRecord method

Future<Tuple2> deleteRecord(
  1. String repo,
  2. String collection,
  3. String rkey, {
  4. String? swapRecord,
  5. String? swapCommit,
})

Implementation

Future<Tuple2> deleteRecord(String repo, String collection, String rkey,
    {String? swapRecord, String? swapCommit}) async {
  Map<String, dynamic> params = {
    "repo": repo,
    "collection": collection,
    "rkey": rkey,
  };
  API.add(params, {
    "swapRecord": swapRecord,
    "swapCommit": swapCommit,
  });
  http.Response res = await api.post("com.atproto.repo.deleteRecord",
      headers: {
        "Content-Type": "application/json",
        "Authorization": "Bearer ${api.session.accessJwt}"
      },
      body: json.encode(params));
  return Tuple2<int, Map<String, dynamic>>(res.statusCode, {});
}