I implemented a generic PHP hapi-server #160
dgarciabriseno
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Thanks for posting this! I forward this to the hapi-dev listserv: https://groups.io/g/hapi-dev The verifier was updated to include some 3.0 and 3.1 features: https://hapi-server.org/verify/?url=https://api.beta.helioviewer.org/hapi/. One issue that I noticed is that you don't support the old "id" (replaced with "dataset"). The verifier needs to be modified to check this, as this is a common issue. Not all of the clients have been updated to use "dataset" if the server using HAPI 3+. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Repository: https://github.com/dgarciabriseno/hapiserver-php
Online Demo: https://api.beta.helioviewer.org/hapi/about
I wrote it to the 3.1 spec. I'm pretty sure it's fully compliant, I paid close attention to the spec while writing it.
But it doesn't support all optional features documented in the spec.
Currently there's no verifiers for 3.1 so I can't use an automated test to confirm it's fully compliant.
I went into this with the idea of just serving data directly from a SQL table, but I wrote an interface so that in theory if you wrote a PHP script that matches the interface for querying metadata and the data itself, you could serve any kind of data that there's a driver for. So it's extensible in that sense.
Check out the README for what's supported and not supported.
I think it will be useful. I'm working on more configuration features, for my use case I need to specify specific columns to serve, and also do some post processing before sending the data to the user. I want that to be implemented in a general fashion so that it will be easy to customize for different use cases.
Beta Was this translation helpful? Give feedback.
All reactions