Index: trunk/extensions/Storyboard/api/ApiStoryboardStoriesFeed.php |
— | — | @@ -35,7 +35,7 @@ |
36 | 36 | */ |
37 | 37 | class ApiStoryboardStoriesFeed extends ApiQueryBase { |
38 | 38 | public function __construct( $main, $action ) { |
39 | | - parent :: __construct( $main, $action ); |
| 39 | + parent :: __construct( $main, $action, 'st' ); |
40 | 40 | } |
41 | 41 | |
42 | 42 | /** |
— | — | @@ -45,8 +45,7 @@ |
46 | 46 | // Get the requests parameters. |
47 | 47 | $params = $this->extractRequestParams(); |
48 | 48 | |
49 | | - // Get a slave db object to do read operations against. |
50 | | - $dbr = wfGetDB( DB_SLAVE ); |
| 49 | + |
51 | 50 | } |
52 | 51 | |
53 | 52 | /** |
— | — | @@ -55,17 +54,14 @@ |
56 | 55 | */ |
57 | 56 | public function getAllowedParams() { |
58 | 57 | return array ( |
59 | | - 'offset' => array ( |
60 | | - ApiBase :: PARAM_DFLT => 0, |
61 | | - ApiBase :: PARAM_TYPE => 'integer', |
62 | | - ApiBase :: PARAM_MIN => 0, |
63 | | - ), |
64 | | - 'size' => array ( |
65 | | - ApiBase :: PARAM_DFLT => 5, |
66 | | - ApiBase :: PARAM_TYPE => 'integer', |
| 58 | + 'limit' => array( |
| 59 | + ApiBase :: PARAM_DFLT => 10, |
| 60 | + ApiBase :: PARAM_TYPE => 'limit', |
67 | 61 | ApiBase :: PARAM_MIN => 1, |
68 | | - ApiBase :: PARAM_MAX => 100, |
69 | | - ), |
| 62 | + ApiBase :: PARAM_MAX => ApiBase :: LIMIT_BIG1, |
| 63 | + ApiBase :: PARAM_MAX2 => ApiBase :: LIMIT_BIG2 |
| 64 | + ), |
| 65 | + 'continue' => null, |
70 | 66 | ); |
71 | 67 | } |
72 | 68 | |
— | — | @@ -94,9 +90,9 @@ |
95 | 91 | */ |
96 | 92 | protected function getExamples() { |
97 | 93 | return array ( |
98 | | - 'api.php?action=stories', |
99 | | - 'api.php?action=stories&offset=42', |
100 | | - 'api.php?action=stories&offset=4&size=2', |
| 94 | + 'api.php?action=query&list=stories', |
| 95 | + 'api.php?action=query&list=stories&stcontinue=42', |
| 96 | + 'api.php?action=query&list=stories&stcontinue=4&stlimit=2', |
101 | 97 | ); |
102 | 98 | } |
103 | 99 | |