$feed->link(rss2 => $base . "/bookbag/rss2/$id");
$feed->link(html => $base . "/bookbag/html/$id");
+ $feed->link(
+ OPAC =>
+ $base . '/../../../opac/en-US/skin/default/xml/rresult.xml?rt=list&' .
+ join('&', map { 'rl=' . $_->target_biblio_record_entry } @{$bucket->items} ),
+ 'text/xhtml'
+ );
+
+
print "Content-type: application/xml; charset=utf-8\n\n";
print entityize($feed->toString) . "\n";
<Param name="startPage" value="{startPage?}"/>
<Param name="startIndex" value="{startIndex?}"/>
<Param name="count" value="{count?}"/>
+ <Param name="language" value="{language?}"/>
</Url>
<Url type="application/rss+xml"
method="post"
<Param name="startPage" value="{startPage?}"/>
<Param name="startIndex" value="{startIndex?}"/>
<Param name="count" value="{count?}"/>
+ <Param name="language" value="{language?}"/>
</Url>
<Url type="application/mods+xml"
method="post"
<Param name="startPage" value="{startPage?}"/>
<Param name="startIndex" value="{startIndex?}"/>
<Param name="count" value="{count?}"/>
+ <Param name="language" value="{language?}"/>
+ </Url>
+ <Url type="application/marcxml+xml"
+ method="post"
+ template="$base/1.1/-/$class/marcxml/{searchTerms}">
+ <Param name="startPage" value="{startPage?}"/>
+ <Param name="startIndex" value="{startIndex?}"/>
+ <Param name="count" value="{count?}"/>
+ <Param name="language" value="{language?}"/>
+ </Url>
<LongName>Search by $class</LongName>
<Query role="example" searchTerms="harry+potter" />
<Developer>Mike Rylander for GPLS/PINES</Developer>
<SyndicationRight>open</SyndicationRight>
<AdultContent>false</AdultContent>
- <Language>en-us</Language>
+ <Language>en-US</Language>
<OutputEncoding>UTF-8</OutputEncoding>
<InputEncoding>UTF-8</InputEncoding>
</OpenSearchDescription>
my $page = $cgi->param('startPage') || 1;
my $offset = $cgi->param('startIndex') || 1;
my $limit = $cgi->param('count') || 10;
+ my $lang = $cgi->param('language') || 'en-US';
if ($page > 1) {
$offset = ($page - 1) * $limit;
my ($terms,$class,$type,$org,$version) = reverse split '/', $path;
- if ($org !~ /^[1-9]{1}[0-9]*$/o) {
- $org = 1;
- }
-
if ($version eq '1.0') {
$type = 'rss2';
} elsif ($type eq '-') {
warn "searching for $class -> [$terms] via OS $version, response type $type";
+ my $org_unit;
+ if ($org eq '-') {
+ $org_unit = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => parent_ou => undef
+ )->gather(1);
+ } else {
+ $org_unit = $actor->request(
+ 'open-ils.actor.org_unit_list.search' => shortname => $org
+ )->gather(1);
+ }
+
my $recs = $search->request(
'open-ils.search.biblio.record.class.search' => $class,
{ term => $terms,
- org_unit => $org,
+ org_unit => $org_unit->[0]->id,
limit => $limit,
offset => $offset,
}
$unapi,
);
+ $feed->title("Search results for [$terms] at ".$org_unit->[0]->name);
+ $feed->creator($host);
+ $feed->update_ts(gmtime_ISO8601());
+
=head
my $bucket = $actor->request("open-ils.actor.container.public.flesh", 'biblio', $id)->gather(1);
my $bucket_tag = "tag:$host,$year:record_bucket/$id";
$unapi,
);
- $feed->title("Items in Book Bag #".$bucket->id);
- $feed->creator($host);
- $feed->update_ts(gmtime_ISO8601());
-
$feed->link(atom => $id);
$feed->link(rss2 => $id);
$feed->link(html => $id);
'application/opensearch+xml'
);
+ $feed->link(
+ opac =>
+ $base . "/../../opac/$lang/skin/default/xml/rresult.xml?rt=list&" .
+ join('&', map { 'rl=' . $_->[0] } @{$recs->{ids}} ),
+ 'text/xhtml'
+ );
print "Content-type: application/xml; charset=utf-8\n\n";