2 require '../oils_header.pl';
3 use vars qw/ $user $authtoken /;
4 use strict; use warnings;
5 use Time::HiRes qw/time/;
9 #-----------------------------------------------------------------------------
10 # Does a checkout, renew, and checkin
11 #-----------------------------------------------------------------------------
13 err("usage: $0 <config> <username> <password> <patronid> <title> <text>") unless $ARGV[5];
15 my $config = shift; # - bootstrap config
16 my $username = shift; # - oils login username
17 my $password = shift; # - oils login password
24 osrf_connect($config);
25 oils_login($username, $password);
35 #-----------------------------------------------------------------------------
37 #-----------------------------------------------------------------------------
42 my $note = Fieldmapper::actor::usr_note->new;
44 $note->usr($patronid);
51 'open-ils.actor.note.create', $authtoken, $note );
54 printl("created new note $id");
55 push(@created_ids, $id);
63 my $notes = simplereq(
65 'open-ils.actor.note.retrieve.all', $authtoken,
66 { patronid => $patronid} );
68 oils_event_die($notes);
71 printl("received note:");
72 printl("\t". $n->creator);
73 printl("\t". $n->usr);
74 printl("\t". $n->title);
75 printl("\t". $n->value);
83 'open-ils.actor.note.delete', $authtoken, $_);
84 oils_event_die($stat);
85 printl("deleted note $_");