}
+sub retrieve_authority_marcxml {
+ my $self = shift;
+ my $client = shift;
+ my $rid = shift;
+
+ my $_storage = OpenSRF::AppSession->create( 'open-ils.cstore' );
+
+ my $record = $_storage->request( 'open-ils.cstore.direct.authority.record_entry.retrieve' => $rid )->gather(1);
+ return $U->entityize( $record->marc ) if ($record);
+ return undef;
+}
+
+__PACKAGE__->register_method(
+ method => 'retrieve_authority_marcxml',
+ api_name => 'open-ils.supercat.authority.marcxml.retrieve',
+ api_level => 1,
+ argc => 1,
+ signature =>
+ { desc => <<" DESC",
+Returns the MARCXML representation of the requested authority record
+ DESC
+ params =>
+ [
+ { name => 'authorityId',
+ desc => 'An OpenILS authority::record_entry id',
+ type => 'number' },
+ ],
+ 'return' =>
+ { desc => 'The authority record in MARCXML',
+ type => 'string' }
+ }
+);
+
sub retrieve_record_marcxml {
my $self = shift;
my $client = shift;
my $site = shift;
$log->info("Creating record feed with params [$real_format, $record_list, $unapi, $site]");
- my $feed = create_record_feed( 'record', $real_format, $record_list, $unapi, $site, $real_format =~ /(-full|-uris)$/o ? 1 : 0 );
+ my $bib_or_authority = $__a =~ /^authority/ ? 'authority' : 'record';
+ my $feed = create_record_feed( $bib_or_authority, $real_format, $record_list, $unapi, $site, $real_format =~ /(-full|-uris)$/o ? 1 : 0 );
$feed->root( "$base/../" );
$feed->lib( $site );
$feed->link( next => $next => $feed->type );
my $item_tag = "tag:$host,$year:biblio-record_entry/$rec/$lib";
$item_tag = "tag:$host,$year:isbn/$rec/$lib" if ($search eq 'isbn');
+ $item_tag = "tag:$host,$year:authorit-record_entry/$rec" if ($search eq 'authority');
my $xml = $supercat->request(
"open-ils.supercat.$search.$type.retrieve",