Signbank / Global-signbank

An online sign dictionary and sign database management system for research purposes. Developed originally by Steve Cassidy/ This repo is a fork for the Dutch version, previously called 'NGT-Signbank'.
http://signbank.cls.ru.nl
BSD 3-Clause "New" or "Revised" License
19 stars 12 forks source link

Better API docs #1317

Open Woseseltops opened 3 weeks ago

Woseseltops commented 3 weeks ago

I noticed @rem0g is asking for more documentation (and rightfully so), so I had another look at the wiki... and I noticed that despite my attempts to make it easy to process, it still looks messy. There are multiple cleaner API UIs available, though, so I experimented with translating our API to OpenAPI specs, and then visualizing it with Swagger UI:

https://cls.ru.nl/staff/wstoop/swagger/

It's far from complete, but what do you say @susanodd and @rem0g ? If you like it, I'll make sure to host both the specs and the UI via Github pages, in this repo, so we can all update them.

Notes: the UI also has the option to actually try the API, but that doesn't seem to work yet. It even allows you to define that we use bearer tokens, and allows you to enter your token while experimenting, so it should fully work eventually.

susanodd commented 3 weeks ago

AWESOME @Woseseltops !!

rem0g commented 3 weeks ago

Nice start! That's something I can rely on if i want to test API commands

Woseseltops commented 2 weeks ago

Okay cool. Progress:

Woseseltops commented 1 week ago

I've added them all now! See https://signbank.github.io/Global-signbank/

You can also test some of the endpoints with this tool (didn't test this extensively). For example, this is the result for get_gloss_data:

image

You get more data if you put in your auth token.

susanodd commented 1 week ago

@Woseseltops did you try using NL? I added the "delete/restore" and the "NME" endpoints to the normal wiki yesterday. We don't really want users testing these out, do we? Or can it be restricted to tstMH for updates?