I just need… exactly the same kind of lib but… in PHP
I searched “omeka-s api php client” etc on Google, but found nothing but in other language…
Have you heard a project like that on github or elsewhere, to have an easy to use client (object, methods, etc) in PHP, instead of doing our own http requests manually?
(and some infos are in the json, other are in http headers… if only all 100% of infos was inside the json, it would be less important to have a client to abstract all of that…)
I’m not immediately aware of one… many people using the API are doing so from other languages, and/or are using it without really a specialized client or library.
I will say that very little of what you need is located in the headers, more or less what’s there is just pagination-related stuff like links to the next page and an indicator of how many total results there were.
The advantage of an abstract client, instead of doing manually http request on API endpoints each time is pretty clear. Mutualise some parsings (including those in HTTP headers instead of JSON), have a very clearest code, easiest to re-read and maintain, with only simple objects/methods/functions calls, instead of mixing parsing of json/header in the middle of the logic of other code, doing some check and cleaning before create/update (post) requests, giving the auth credentials just one time in the first object and don’t think about it after, etc, etc. So many conveniences!
As Omeka is itself in PHP, I though there was some PHP users around (from the team or not) who did a lib like that in the language of Omeka, as a usable example of a clean API client.
So, it seems I have to start some code for that… I will say if we publish that in a public git.