<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body>A new request with request id 8324 has been created by koha-devel-request@lists.koha-community.org. Short info on the request is : <br><br>Title : Koha-devel Digest, Vol 200, Issue 15<br>Category : <br>Description : <div>Send Koha-devel mailing list submissions to<br>    koha-devel@lists.koha-community.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br>    https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>or, via email, send a message with subject or body 'help' to<br>    koha-devel-request@lists.koha-community.org<br><br>You can reach the person managing the list at<br>    koha-devel-owner@lists.koha-community.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of Koha-devel digest..."<br><br><br>Today's Topics:<br><br>   1. Re: Checkouts API Question (Stephen Graham)<br>   2. Re: Help needed (Tomas Cohen Arazi)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Tue, 12 Jul 2022 15:04:52 +0000<br>From: Stephen Graham <s.graham4@herts.ac.uk><br>To: "koha-devel@lists.koha-community.org"<br>    <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Checkouts API Question<br>Message-ID:<br>    <LO0P265MB26204E7ACE155246ED7F49FDE7869@LO0P265MB2620.GBRP265.PROD.OUTLOOK.COM><br>    <br>Content-Type: text/plain; charset="utf-8"<br><br>Thanks Arthur for the quick reply! I had totally forgotten about the ILS-DI interface. We do have it set up on our test server – so that is defiantly an option.  We have written a custom endpoint for something else previously so maybe we should explore that avenue again to achieve what we want – I prefer the Oauth2 authentication I think.
<br>
<br>Cheers, Stephen
<br>
<br>From: Koha-devel <koha-devel-bounces@lists.koha-community.org> On Behalf Of Arthur
<br>Sent: 12 July 2022 15:15
<br>To: koha-devel@lists.koha-community.org
<br>Subject: Re: [Koha-devel] Checkouts API Question
<br>
<br>
<br>Hi Stephen,
<br>
<br>Although it's quite old, the ILS-DI interface is still available in 21.11.
<br>
<br>You can check the GetPatronInfo with "show_loans=1" parameter (perhaps by default?) to get the loans.
<br>
<br>Then you also get bibliographic information about those loans in one API call.
<br>
<br>However, ILS-DI is not secure by design, there is no authentication, which means, when you activate ILS-DI it is open to everyone to get personnal information on any of your patrons by scraping with random biblionumber, just be aware of this a put decent security (we use IP restriction which is not ideal but minimum required IMO)
<br>
<br>Best,
<br>
<br>Arthur Suzuki
<br>
<br>Developper @BibLibre
<br>On 12/07/2022 16:06, Stephen Graham wrote:
<br>Hi All – we are on 21.11, and would like to include patron account data in our bespoke University mobile app. I was planning on using the RESTful API to get the data. What we would like is simply a list of titles (plus author and ISBN) along with the due back dates.  I’m struggling , when looking at https://api.koha-community.org/21.11.html<https://api.koha-community.org/21.11.html>, to see how this could be done without using lots of API calls. Would I have to do something like the following:
<br>
<br>
<br>  1.  Call /checkouts to get a list of checkouts from the patron
<br>  2.  Iterate over the checkout_id and call /checkouts/$id for each checkout
<br>  3.  I cannot see any Biblio references in the returned data, so I’d have to then grab the biblio_id from the /items/$id endpoint and then call the /biblios endpoint to get the actual bibliographic data.
<br>
<br>If the patron had 10 items out this would be at least 30 calls to get the bib data. Is that what I would have to do, or am I missing something – like a header or extra query which would return all the info I require from the first endpoint call?
<br>
<br>Any advice/pointers would be much appreciated!!
<br>
<br>Cheers, Stephen
<br>
<br>--------------------------------------
<br>Stephen Graham
<br>Library Technology Consultant
<br>Library and Computing Services
<br>
<br>University of Hertfordshire
<br>Hatfield, Hertfordshire, AL10 9AB
<br>
<br>Email: s.graham4@herts.ac.uk<mailto:s.graham4@herts.ac.uk>
<br>Website: herts.ac.uk
<br>
<br>
<br>
<br>
<br>_______________________________________________
<br>
<br>Koha-devel mailing list
<br>
<br>Koha-devel@lists.koha-community.org<mailto:Koha-devel@lists.koha-community.org>
<br>
<br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel>
<br>
<br>website : https://www.koha-community.org/<https://www.koha-community.org/>
<br>
<br>git : https://git.koha-community.org/<https://git.koha-community.org/>
<br>
<br>bugs : https://bugs.koha-community.org/<https://bugs.koha-community.org/>
<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220712/4ff24f8e/attachment-0001.htm><br><br>------------------------------<br><br>Message: 2<br>Date: Tue, 12 Jul 2022 12:07:20 -0300<br>From: Tomas Cohen Arazi <tomascohen@gmail.com><br>To: Jonathan Druart <jonathan.druart@gmail.com><br>Cc: koha-devel <koha-devel@lists.koha-community.org><br>Subject: Re: [Koha-devel] Help needed<br>Message-ID:<br>    <CABZfb=XajPTqyzugScgC49Oo10-EvBY9UhfS89xMx0J2UoQOzQ@mail.gmail.com><br>Content-Type: text/plain; charset="utf-8"<br><br>Thanks everyone!<br><br>El mar, 12 jul 2022 a las 0:15, Tomas Cohen Arazi (<tomascohen@gmail.com>)<br>escribió:<br><br>> Thanks, Jonathan. Your pointer was very helpful.<br>><br>> El lun, 11 jul 2022 6:27, Jonathan Druart <jonathan.druart@gmail.com><br>> escribió:<br>><br>>> I think the problem is that Koha::Checkouts::Renewals has 2<br>>> ("virtual") FKs on the same column.<br>>><br>>> t::lib::TestBuilder::_create_links is generating an object (/values)<br>>> for "checkout" and $col_values->{checkout _id} has the ID from the<br>>> checkout we generated.<br>>> THEN we are processing the next relationship, old_checkout, and<br>>> generate another checkout, but this time we pass the checkout_id<br>>> previously generated. As we cannot pass an AI value, TestBuilder<br>>> explodes with "Value not allowed for auto_incr issue_id in Issue".<br>>> I guess the fix would be to use the constraint's name instead of the<br>>> column's name.<br>>><br>>> Le sam. 9 juil. 2022 à 02:18, Tomas Cohen Arazi <tomascohen@gmail.com> a<br>>> écrit :<br>>> ><br>>> > Hi all, I've been trying to track down a problem with TestBuilder<br>>> tests. The are failing (almost) randomly but I narrow it down to:<br>>> ><br>>> > - Koha::Checkouts::Renewals<br>>> > - Koha::Biblio::ItemGroup::Items<br>>> ><br>>> > I ran out of fuel today, but it would be great if some more eyes were<br>>> put on this, so I can move on with pushing new stuffs with a happy test<br>>> suite. This is the subset of TestBuilder.t that I'm looking at (put it in<br>>> t/db_dependent/test.t):<br>>> ><br>>> > https://paste.koha-community.org/10864<br>>> ><br>>> > My feeling is TestBuilder->_should_be_fk is not working as it should<br>>> (for Koha::Checkouts::Renewals) and about Koha::Biblio::ItemGroup::Items,<br>>> all I can say is that the table is a linking table, pretty much like the<br>>> club holds one.<br>>> ><br>>> > Thanks in advance and have a great weekend!<br>>> ><br>>> > --<br>>> > Tomás Cohen Arazi<br>>> > Theke Solutions (http://theke.io)<br>>> > ✆ +54 9351 3513384<br>>> > GPG: B2F3C15F<br>>> > _______________________________________________<br>>> > Koha-devel mailing list<br>>> > Koha-devel@lists.koha-community.org<br>>> > https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>>> > website : https://www.koha-community.org/<br>>> > git : https://git.koha-community.org/<br>>> > bugs : https://bugs.koha-community.org/<br>>><br>><br><br>-- <br>Tomás Cohen Arazi<br>Theke Solutions (http://theke.io)<br>✆ +54 9351 3513384<br>GPG: B2F3C15F<br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220712/77aebcf7/attachment.htm><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>Koha-devel mailing list<br>Koha-devel@lists.koha-community.org<br>https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel<br>website : https://www.koha-community.org/<br>git : https://git.koha-community.org/<br>bugs : https://bugs.koha-community.org/<br><br><br>------------------------------<br><br>End of Koha-devel Digest, Vol 200, Issue 15<br>*******************************************<br></div><br><br>NOTE: You are receiving this mail because, the Requester/Technician wanted you to get notified on this request creation.<br></body></html>