Wikimedia-contrib icon indicating copy to clipboard operation
Wikimedia-contrib copied to clipboard

Add JSON APIs

Open PiRSquared17 opened this issue 9 years ago • 4 comments

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.]

PiRSquared17 avatar Nov 08 '14 22:11 PiRSquared17

HTML is machine readable too, but scraping is a pain compared to using JSON results.

PiRSquared17 avatar Nov 08 '14 22:11 PiRSquared17

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).

Pathoschild avatar Nov 10 '14 03:11 Pathoschild

I too would like an API for AccountEligibility.

legoktm avatar Aug 25 '22 03:08 legoktm

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.

legoktm avatar Jan 15 '24 06:01 legoktm