Wikimedia-contrib
Wikimedia-contrib copied to clipboard
Add JSON APIs
It would be great if there were some way to query account eligibility in a machine-readable format. The output could be something like JSON, XML, or YAML. JSON would be my preference.
[This is a feature request/enhancement, not a bug.]
HTML is machine readable too, but scraping is a pain compared to using JSON results.
A JSON API is something I do want to add in the near term; I'm looking to transition the tools to node.js, which seems much better suited than PHP to building an API. I did a very early prototype yesterday; if all goes well I'll have an OAuth login (#30) on node.js, and I'll port the framework and move the tools over one by one (building an API for each as part of the migration).
I too would like an API for AccountEligibility.
For reference, here's the code I have that's scraping AccountEligibility: https://gitlab.wikimedia.org/toolforge-repos/poty-stuff/-/blob/main/src/eligibility.rs?ref_type=heads#L9 - it's primarily looking for the data-is-eligible="1"
string.