3 #----------------------------------------------------------------
4 # Code for testing the container API
5 #----------------------------------------------------------------
7 require '../oils_header.pl';
8 use vars qw/ $apputils $memcache $user $authtoken $authtime /;
9 use strict; use warnings;
11 #----------------------------------------------------------------
12 err("\nusage: $0 <config> <oils_username> <oils_password> <copyid> <org_id> [<count>]\n".
13 "If <count> is defined, then <count> in-house uses will be ".
14 "created for the copy, otherwise 1 is created" ) unless $ARGV[4];
15 #----------------------------------------------------------------
22 my $count = shift || 1;
24 my $method = 'open-ils.circ.in_house_use.create';
27 osrf_connect($config);
28 oils_login($username, $password);
29 do_in_house_use($copyid, $location, $count);
35 #----------------------------------------------------------------
39 my( $copyid, $location, $count ) = @_;
42 'open-ils.circ.in_house_use.create', $authtoken,
44 location => $location,
47 oils_event_die($resp);
48 printl("Successfully created " . scalar(@$resp) . " in house \n".
49 "use actions for copy $copyid and location $location");