summaryrefslogtreecommitdiff
path: root/includes/api/ApiQueryExternalLinks.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/api/ApiQueryExternalLinks.php')
-rw-r--r--includes/api/ApiQueryExternalLinks.php25
1 files changed, 7 insertions, 18 deletions
diff --git a/includes/api/ApiQueryExternalLinks.php b/includes/api/ApiQueryExternalLinks.php
index 583ef697..95666354 100644
--- a/includes/api/ApiQueryExternalLinks.php
+++ b/includes/api/ApiQueryExternalLinks.php
@@ -31,7 +31,7 @@
*/
class ApiQueryExternalLinks extends ApiQueryBase {
- public function __construct( $query, $moduleName ) {
+ public function __construct( ApiQuery $query, $moduleName ) {
parent::__construct( $query, $moduleName, 'el' );
}
@@ -127,6 +127,7 @@ class ApiQueryExternalLinks extends ApiQueryBase {
public function getParamDescription() {
$p = $this->getModulePrefix();
+
return array(
'limit' => 'How many links to return',
'offset' => 'When more results are available, use this to continue',
@@ -134,32 +135,20 @@ class ApiQueryExternalLinks extends ApiQueryBase {
"Protocol of the URL. If empty and {$p}query set, the protocol is http.",
"Leave both this and {$p}query empty to list all external links"
),
- 'query' => 'Search string without protocol. Useful for checking whether a certain page contains a certain external url',
+ 'query' => 'Search string without protocol. Useful for checking ' .
+ 'whether a certain page contains a certain external url',
'expandurl' => 'Expand protocol-relative URLs with the canonical protocol',
);
}
- public function getResultProperties() {
- return array(
- '' => array(
- '*' => 'string'
- )
- );
- }
-
public function getDescription() {
- return 'Returns all external URLs (not interwikis) from the given page(s)';
- }
-
- public function getPossibleErrors() {
- return array_merge( parent::getPossibleErrors(), array(
- array( 'code' => 'bad_query', 'info' => 'Invalid query' ),
- ) );
+ return 'Returns all external URLs (not interwikis) from the given page(s).';
}
public function getExamples() {
return array(
- 'api.php?action=query&prop=extlinks&titles=Main%20Page' => 'Get a list of external links on the [[Main Page]]',
+ 'api.php?action=query&prop=extlinks&titles=Main%20Page'
+ => 'Get a list of external links on the [[Main Page]]',
);
}