readCollections abstract method

Future<Result<ReadCollectionsResponse>> readCollections({
  1. required List<String> refs,
})

Reads collections by their references.

By default, users can only read their own collections.

Example:

final result = await client.readCollections(
  refs: ['collection:123', 'collection:456'],
);

switch (result) {
  case Success(data: final response):
    print('Found ${response.collections.length} collections');
  case Failure(error: final error):
    print('Failed to read collections: $error');
}

Returns a Result containing api.ReadCollectionsResponse or an error.

Implementation

Future<Result<api.ReadCollectionsResponse>> readCollections({
  required List<String> refs,
});