getRecord method

Future<XRPCResponse<GetRecordOutput>> getRecord({
  1. String? repo,
  2. required NSID collection,
  3. required String rkey,
  4. String? cid,
  5. Map<String, String>? $unknown,
  6. Map<String, String>? $headers,
  7. GetClient? $client,
})

Get a single record from a repository. Does not require auth.

https://atprotodart.com/docs/lexicons/com/atproto/repo/getRecord

Implementation

Future<XRPCResponse<GetRecordOutput>> getRecord({
  String? repo,
  required NSID collection,
  required String rkey,
  String? cid,
  Map<String, String>? $unknown,
  Map<String, String>? $headers,
  GetClient? $client,
}) async =>
    await _ctx.get<GetRecordOutput>(
      ns.comAtprotoRepoGetRecord,
      headers: $headers,
      parameters: {
        'repo': repo ?? _ctx.repo,
        'collection': collection.toString(),
        'rkey': rkey,
        if (cid != null) 'cid': cid,
        ...?$unknown,
      },
      to: const GetRecordOutputConverter().fromJson,
      client: $client,
    );