readStorageObject method

  1. @override
Future<StorageObject> readStorageObject({
  1. required Session session,
  2. String? collection,
  3. String? key,
  4. String? userId,
})
override

Implementation

@override
Future<StorageObject> readStorageObject({
  required model.Session session,
  String? collection,
  String? key,
  String? userId,
}) async {
  final res = await _client.readStorageObjects(
    ReadStorageObjectsRequest(
      objectIds: [
        ReadStorageObjectId(
          collection: collection,
          key: key,
          userId: userId,
        ),
      ],
    ),
    options: _getSessionCallOptions(session),
  );

  return res.objects.first;
}