return [ sort { $a->{depth} <=> $b->{depth} } @count ];
}
-
-__PACKAGE__->register_method(
- method => "record_id_to_copy_count_batch",
- api_name => "open-ils.search.biblio.record.copy_count.batch",
- stream => 1,
- signature => {
- desc => q/Returns a stream of copy summaries for a set of records
- for the context org unit and all ancestor org units/,
- params => [
- {desc => 'Context org unit id', type => 'number'},
- {desc => 'Record IDs', type => 'array'}
- ],
- return => {
- desc => q/
- Returns a stream of objects with 2 keys:
- record: record id,
- counts: see open-ils.search.biblio.record.copy_count
- /,
- type => 'object'
- }
- }
-);
-
-__PACKAGE__->register_method(
- method => "record_id_to_copy_count_batch",
- api_name => "open-ils.search.biblio.record.copy_count.batch.staff",
- stream => 1,
- signature => 'see open-ils.search.biblio.record.copy_count.batch'
-
-);
-
-__PACKAGE__->register_method(
- method => "record_id_to_copy_count_batch",
- api_name => "open-ils.search.biblio.metarecord.copy_count.batch",
- stream => 1,
- signature => 'see open-ils.search.biblio.record.copy_count.batch'
-);
-
-__PACKAGE__->register_method(
- method => "record_id_to_copy_count_batch",
- api_name => "open-ils.search.biblio.metarecord.copy_count.batch.staff",
- stream => 1,
- signature => 'see open-ils.search.biblio.record.copy_count.batch'
-);
-
-
-sub record_id_to_copy_count_batch {
- my ($self, $client, $org_id, $record_ids) = @_;
-
- for my $rec_id (@$record_ids) {
- $client->respond({
- record => $rec_id,
- counts => record_id_to_copy_count($self, $client, $org_id, $rec_id)
- });
- }
-
- return undef;
-}
-
-
__PACKAGE__->register_method(
method => "record_has_holdable_copy",
api_name => "open-ils.search.biblio.record.has_holdable_copy",