Sam Reed
69d011a23f
Examples can just be a string
...
So if it's not false, it can be string|array, if it's a string, just put it in an array
2012-02-24 02:06:39 +00:00
Sam Reed
6115b93df8
Re-instate most of the revisions for bug 33147 "API examples should explain what they do"
...
Using this to sync up my working copies
Should have the little niggles tidied up though
2011-12-27 16:22:35 +00:00
Brion Vibber
ad0d48d6bc
Revert r106439, r106441 - bad formatting mushing separate lines together
2011-12-20 22:11:29 +00:00
Max Semenik
6bd85a6a2c
Follow-up r97303: sort module names in paraminfo's paraminfo
2011-12-20 07:50:45 +00:00
Sam Reed
6c80c5ff87
Prep work for * (bug 33147) API examples should explain what they do
...
Now formatted in the autogenerated documentation
Format for paraminfo adds a description attribute to output
query allimages descriptions are tranformed, need to do/add to other ones
2011-12-16 15:28:35 +00:00
Sam Reed
53000baecf
Oh noes, moar http:// -> https://
2011-11-28 15:43:11 +00:00
Sam Reed
f3839fe71f
Added "ApiGetDescription" hook
2011-11-28 15:33:28 +00:00
John Du Hart
2e7d867478
Removed the 'eclipse helper' bit on top of every API module
...
It's a parctice that dates back to 2006 when the API was first written, and frankly isn't covered by the coding conventions. Same thing with the docblocks, they're all copypasted with some bits changed and don't even make sense if you look at them in the genereated code docs.
I don't feel that any of us depend on this anymore (get a better IDE), so in the inerest of consistancy it's time we said goodbye to it.
2011-11-16 00:17:26 +00:00
Sam Reed
d8957aca62
Refactor variables to give somewhat useful names
2011-09-16 18:28:24 +00:00
Sam Reed
324e642c2c
Add handling of format modules to ApiParamInfo
2011-09-16 18:25:02 +00:00
Sam Reed
478a95fb13
Give a list of modules to query and action into paraminfo
2011-09-16 18:11:47 +00:00
Sam Reed
a5628f5734
Based on diff to wikia, set more functions consistently public rather than protected
2011-08-17 22:24:21 +00:00
Sam Reed
9f785bc597
Followup r92430 per CR, like r94448
2011-08-15 18:56:37 +00:00
Max Semenik
e214ea91df
ApiParamInfo: if no help URLs are available, return an empty array instead of array with one empty element
2011-08-14 09:37:23 +00:00
Sam Reed
54946d842f
* (bug 29935) Improve formatting of examples in ApiParamInfo
...
Old example string with newlines left for the moment, pending discussion on bug...
2011-07-18 13:19:46 +00:00
Sam Reed
937c3bb69f
Followup r92396
...
Using action=paraminfo to give help urls (and examples for that matter!!) look awful as a string with an encoded \n in the middle of it
2011-07-17 17:09:51 +00:00
Sam Reed
ac0ff8fb37
Followup r92396 rename method, fix boolean comparison that was supposed to be inverted when de-indenting
2011-07-17 16:23:29 +00:00
Sam Reed
d18c0dc315
* (bug 28817) Add reference help page link to API Modules
...
Start of this bug, fleshed out base code implemented, plus a few key modules (will finish rest up soon)
Tweaked/improved/updated some documentation as I went through also
2011-07-17 16:18:09 +00:00
Sam Reed
4ef1b5cb39
Fix 2 usages of 'bool' when 'boolean' is used elsewhere
2011-06-05 21:56:27 +00:00
Sam Reed
0f618da076
* (bug 27790) add query type for querymodules to action=paraminfo
2011-05-10 23:46:27 +00:00
Sam Reed
2730c42dd8
Whitespace fixes
...
Addition/tweak of documentation
2011-05-08 21:47:01 +00:00
Sam Reed
4d18298e86
Followup r87132, per Bryan, still return the "limit" to be the current users limit, but return high/low limit
2011-04-29 21:46:17 +00:00
Sam Reed
32f8443064
* (bug 28238) paraminfo: output both limits for multi param
2011-04-29 20:52:57 +00:00
Max Semenik
40294d93ba
Follow-up r86954: make one centralised call to array_values(), there are more breakages of this kind
2011-04-26 19:20:19 +00:00
Sam Reed
6d118609c1
* (bug 28702) Undefined offset in ApiParamInfo.php
...
Followup r85758 (bug 28254)
If no DFLT is set, fall back to "null", which means a string parameter
2011-04-25 22:56:08 +00:00
Sam Reed
af3a1052ff
* (bug 28254) action=paraminfo: Extract type from PARAM_DFLT if PARAM_TYPE is not set
...
Patch by Umherirrender
2011-04-10 13:01:47 +00:00
Zak Greant
6b8cbcdd11
Make paraminfo output examples along with parameter information.
2011-01-21 23:12:51 +00:00
Sam Reed
b3496e5fc9
Another variable type hint, and some function documentation
2010-12-23 20:00:02 +00:00
Sam Reed
6309c920dd
Delete all the "API for MediaWiki 1.8+" comments
...
Add since to ApiQueryQueryPage
2010-12-22 20:52:06 +00:00
Roan Kattouw
17487e40ba
Replace my old e-mail address with my new one in API comments. A bit outdated (dropped the old one in September '08)
2010-12-22 20:48:10 +00:00
Sam Reed
c48bbaec3c
Remove error from ApiUserrights getPossibleErrors, it doesn't explicitally throw an error for missing user param. Does some other fancy errors from the special page. We should have a way for that to tell us it throws some errors....
...
Remove trailing whitespace
2010-10-01 19:37:38 +00:00
Alexandre Emsenhuber
457eb73b61
Standardised file description headers, added @file
2010-08-07 19:59:42 +00:00
Sam Reed
e2ec02531d
Reduce unnecessary seperate nested if's, move them up to the top if (as per most of the others where this is necessary!)
2010-08-06 11:20:39 +00:00
Sam Reed
83411cd0fa
Followup r70460 per Umherirrender comment
...
Add "required" to ApiParamInfo
2010-08-06 11:18:39 +00:00
Derk-Jan Hartman
921619b119
Correct the address of the FSF in some of the GPL headers
...
59 Temple Place -> 51 Franklin Street
2010-06-21 13:13:32 +00:00
Sam Reed
0a17a0360a
Append " and errors" to getDescription for ApiParamInfo to signify that information about the errors a module can return is there
2010-04-24 11:58:52 +00:00
Jack Phoenix
c286869e38
API: fix copyright symbol, coding style cleanup, more braces
2010-02-23 18:05:46 +00:00
Sam Reed
3fcc9a8bcd
Fix r62331 - If we renamed a method, we need to to it everywhere!
2010-02-11 22:22:20 +00:00
Sam Reed
aa973b9eb7
More of bug 18771 - List possible errors in action=paraminfo
...
Followup to comments of r62282
2010-02-11 21:34:35 +00:00
Sam Reed
ee60482546
Start implementation of bug 18771 - List possible errors in action=paraminfo
...
Base has empty array() returning method, ApiBlock has implementation of possibleErrors from code above (possibly not complete)
Can be finished incrementally, so serves as a review point for Roan
2010-02-11 01:13:45 +00:00
Sam Reed
b739e97341
More of r61437 (adding/removing whitespace)
2010-01-23 22:47:49 +00:00
Aryeh Gregor
3758769f0d
stylize.php on API code
...
"I wouldn't object to stylizing the API code to bring it in line with
the rest of MW on principle, but I'm not gonna bother myself." --Roan
<http://www.mediawiki.org/wiki/Special:Code/MediaWiki/60657#c5108 >
If you're seeing this commit in blames, tell your blame tool to ignore
whitespace, e.g., git blame -w or svn blame -x -w.
2010-01-11 15:55:52 +00:00
Chad Horohoe
3cdae769b7
Only use one if, not 2
2010-01-05 10:50:07 +00:00
Chad Horohoe
c660ee428f
(bug 21106) tag deprecated parameter in action=paraminfo. Add new PARAM_DEPRECATED const for automagically tagging deprecated parameters. Keeps action=help and action=paraminfo up to date
2009-10-28 00:56:07 +00:00
Roan Kattouw
d76bdf62be
API: (bug 18749) Add generator flag to action=paraminfo output. Also fixes an internal error in r50367
2009-05-10 09:52:31 +00:00
Roan Kattouw
560365d615
API: (bug 18730) Add version information to action=paraminfo output
2009-05-09 13:00:59 +00:00
Roan Kattouw
5daf0db847
API: (bug 18709) Missing descriptions for some parameters in action=paraminfo output
2009-05-08 17:24:49 +00:00
Chad Horohoe
49bfc91366
(bug 18710) Fixed internal error with empty parameter in ApiParamInfo
2009-05-07 20:09:45 +00:00
Roan Kattouw
21fd7af97e
* API: (bug 17774) API pretends action=query doesn't exist for users without read rights
...
* Instead of hiding read-restricted modules, throw an error when a user without read rights tries to use them
* Do the same for write modules when $wgEnableWriteAPI is false
* Indicate whether a module needs read or write rights in action=help and action=paraminfo
* BREAKING CHANGE: action=purge now requires write rights and, for anonymous users, a POST request
2009-03-06 13:49:44 +00:00
Roan Kattouw
e0542e1cf9
API: Make information about the main module (ApiMain) and the pageset module (ApiPageSet) available through action=paraminfo
2009-02-14 14:56:20 +00:00