https://bugzilla.wikimedia.org/show_bug.cgi?id=38891

--- Comment #5 from Krinkle <[email protected]> 2012-08-24 15:40:13 UTC ---
The three things I like most about other APIs that I don't see in MediaWiki is:
* Request-header based formatting (instead of format=json, use "Accept:
application/json", like $.ajax({ dataType: "json" }) already does. Optionally
still allowing an override, though I don't think that should be necessary. Or
alternatively drop all non-JSON formats as of API 2.0, may sound radical but I
think its perfectly reasonable).
* Less complicated responses
 - don't wrap everything in { <actionname>: }
 - always include all properties, the <>prop thing is very annoying imho
* Simple directory-like urls (either through rewriting or with path info)

Inspired by BrowserStack's JSON API. Also contains handling for versioning,
which would be the first level separator.

Format: https://localhost/w/api/version/action[/primary parameter | query
string]

* https://localhost/w/api/1/opensearch/fooba
* https://localhost/w/api/1/sitematrix
* https://localhost/w/api/1/query/users
* https://localhost/w/api/1/query/users?usfilter[]=John&usfilter[]=George

Compared to:
* https://localhost/w/api.php?format=json&action=opensearch&search=fooba
* https://localhost/w/api.php?format=json&action=sitematrix
* https://localhost/w/api.php?format=json&action=query&list=users
*
https://localhost/w/api.php?format=json&action=query&list=users&ususers=John|George

Anyway, just throwing it out there for feedback.

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to