bic-org-uk / bic-lcf

BIC Library Communication Framework
https://bic-org-uk.github.io/bic-lcf
Other
7 stars 4 forks source link

Returning loans for a patron #323

Open nchamen opened 8 months ago

nchamen commented 8 months ago

I'm currently working to implement a number of LCF-compliant web services and have a question regarding returning the loans for a patron.

I'm looking at "02 Retrieve entity instance list" on this page: https://github.com/bic-org-uk/bic-lcf/blob/v1.3.0/docs/LCF-RESTWebServiceSpecification.md and trying to establish the format of the response object if a call such as GET http://192.168.0.99:80/lcf/1.0/patrons/12345/loans is made.

The example given is:

<lcf-entity-list-response xmlns="http://ns.bic.org/lcf/1.0"\>
  <entity-type>01</entity-type>
  <entity href="http://192.168.0.99:80/lcf/1.0/items/1234567890"/>
</lcf-entity-list-response>

However, this format would seem to require that further calls be made to get the details of each of the items on loan to the patron. Is this correct? Or can I return the list of item entities with all the associated data that would enable the consumer of the API make one call to be able to display a full list of loaned items? If so, what format would this take? An example of the XML to return would be very helpful.

Thanks, Neal

anthonywhitford commented 8 months ago

Hi Neal,

Within the current implementation, a GET request for a list will return you an XML entity containing references to the resources within the list as you've described. This means that you would need to perform a GET request against each of those resources to get the full details.

There has been discussion on improving this within issue 218, https://github.com/bic-org-uk/bic-lcf/issues/218. We are starting to review what content should be addressed for the next edition of LCF, so please review the thread of issue 218 and feel free to contribute.

Best regards, -Ant

nchamen commented 8 months ago

Thanks Ant. I've read through issue 218 and will add my thoughts to it.