Patrons endpoint help needed

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Patrons endpoint help needed

Tomas Cohen Arazi
Hi everyone, I've submitted a patchset to bug 19784 [1]. This is my starting point for the umbrella bug (19774). Next endpoints to fix are /acquisitions/vendors, /cities, /holds and /illrequests. Those are easier IMHO.

On the /patrons one, I already changed
- borrowernumber -> patron_id
- branchcode -> library_id
- categorycode -> category_id

The needed code for this (or any) attribute rename is already done. The remaining work is mostly adding the mappings we would like to add, to the _to_model and _to_api functions.

I now need help from you on the parameter names (patrons have really misleading attribute names, and they don't match the UI most of the time). Please comment here, and preferably on the bug itself. If you contribute a patch for your proposed change, please add a test on the specific attribute on one of the GET tests too. We try to cover all the special cases with tests.

Ah, snake case was picked at some point, so 'cardnumber' could become 'card_number', for example.

Thanks for any input.

--
Tomás Cohen Arazi
Theke Solutions (https://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F

_______________________________________________
Koha-devel mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

Re: Patrons endpoint help needed

Tomas Cohen Arazi
I forgot to mention we have coding guidelines for the REST api [1] which say the terminology we use, should be the less Koha-specific we can.
Please keep that in mind!


El vie., 8 dic. 2017 a las 11:27, Tomas Cohen Arazi (<[hidden email]>) escribió:
Hi everyone, I've submitted a patchset to bug 19784 [1]. This is my starting point for the umbrella bug (19774). Next endpoints to fix are /acquisitions/vendors, /cities, /holds and /illrequests. Those are easier IMHO.

On the /patrons one, I already changed
- borrowernumber -> patron_id
- branchcode -> library_id
- categorycode -> category_id

The needed code for this (or any) attribute rename is already done. The remaining work is mostly adding the mappings we would like to add, to the _to_model and _to_api functions.

I now need help from you on the parameter names (patrons have really misleading attribute names, and they don't match the UI most of the time). Please comment here, and preferably on the bug itself. If you contribute a patch for your proposed change, please add a test on the specific attribute on one of the GET tests too. We try to cover all the special cases with tests.

Ah, snake case was picked at some point, so 'cardnumber' could become 'card_number', for example.

Thanks for any input.

--
Tomás Cohen Arazi
Theke Solutions (https://theke.io)
✆ <a href="tel:+54%209%20351%20351-3384" value="+5493513513384" target="_blank">+54 9351 3513384
GPG: B2F3C15F
--
Tomás Cohen Arazi
Theke Solutions (https://theke.io)
✆ +54 9351 3513384
GPG: B2F3C15F

_______________________________________________
Koha-devel mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-devel
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/