revanced-api
revanced-api copied to clipboard
fix: properly abstract the backend from the frontend
Issue
Currently, the API returns keywords such as "repository" or "login" propagating the backend naming schema (GitHub) but it does not make sense in the sense of the frontend of the API to mention them. ReVanced API clients don't have anything to do with GitHub.
/v2/team/membersmentions "login"./v2/{repo}/contributorsmentions "repo" in the path as well as "GitHub" in the documentation
Solution
Properly transform the backend and abstract it in the API. As an example /v2/team/members can mention "name" instead of "login" and /v2/{repo}/contributors can mention "product" instead of "repo".
This is primarily a documentation issue; not much has to be done refactor-wise. The propagation happened because as I built the main backend on top of GitHub's REST API, the automatic generation of docstrings picked up their API terms. I've put this in the backlog with a low priority because this effort is better done once we have all the endpoints structured adequately so I don't have too much rework.