From: Demian K. <dem...@vi...> - 2012-06-26 16:26:16
|
I think you're right - the .ini file fallback list is probably your best bet unless there is some tricky way (i.e. direct database lookup) to get the full list. - Demian From: Jay Roos [mailto:ja...@gm...] Sent: Tuesday, June 26, 2012 12:21 PM To: Demian Katz Cc: vuf...@li... Subject: Re: [VuFind-Tech] Why is getPickUpLocations called from MyResearch/Holds? Unfortunately the API absolutely requires a titleKey to be passed or it returns an error. It makes a lot of sense because for some libraries the pickup locations are very specific to the item and borrower combination. Unfortunately, I don't think caching a value will be a good option for some libraries and I want to keep the driver generic enough for anyone. I think I'll probably end up using a similar approach to the HorizonXMLAPI driver where the list is specified in the .ini file. I would then use those values as a fall back for cases where no titleKey is available. I'm open to other suggestions though. On Fri, Jun 22, 2012 at 8:46 AM, Demian Katz <dem...@vi...<mailto:dem...@vi...>> wrote: All of the parameters to getPickUpLocations are optional. The idea is that they are meant to be used as filters -- if you pass none in, you get all possible pickup locations. If you pass in patron and/or item information, you only get locations that are legal for that patron and/or item. The reason getPickUpLocations is called by MyResearch/Holds is that it returns a map of internal location IDs to user-readable strings. That map needs to be used to translate location codes in the hold arrays into display strings for the user. What kind of ID does the API require? Could you possibly cache the last good value inside the driver and use that if no external value is passed in? - Demian ________________________________ From: Jay Roos [ja...@gm...<mailto:ja...@gm...>] Sent: Thursday, June 21, 2012 5:27 PM To: vuf...@li...<mailto:vuf...@li...> Subject: [VuFind-Tech] Why is getPickUpLocations called from MyResearch/Holds? I'm having some trouble writing a getPickUpLocations function because the API requires and ID to be passed to be a valid request. That's fine when someone is actually placing a request, but it fails on MyResearch/Holds because it's called without an ID. I'm wondering what the purpose is in calling it from MyResearch/Holds? Any ideas how I might work around it besides creating a static list of locations? -- Jay Roos Computer & Information Systems Coordinator Great River Regional Library 1300 W. St. Germain St. Cloud, MN 56301 -- Jay Roos Computer & Information Systems Coordinator Great River Regional Library 1300 W. St. Germain St. Cloud, MN 56301 (320) 650-2534 |