readStorageObject method
Implementation
@override
Future<StorageObject> readStorageObject({
required model.Session session,
String? collection,
String? key,
String? userId,
}) async {
_session = session;
final res = await _api.nakamaReadStorageObjects(
body: ApiReadStorageObjectsRequest(
objectIds: [
ApiReadStorageObjectId(
collection: collection,
key: key,
userId: userId,
),
],
),
);
final result = StorageObjects()..mergeFromProto3Json(res.body!.toJson());
return result.objects.first;
}