Extension:ShoutWiki API

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manualManual:Extensions
Crystal Clear action run.png
ShoutWiki API

Release status:Extension status beta

ImplementationTemplate:Extension#type API
DescriptionTemplate:Extension#description A collection of ShoutWiki-specific API modules
Author(s)Template:Extension#username Jack Phoenix
Latest versionTemplate:Extension#version 0.5 (17 April 2015)
MediaWikiTemplate:Extension#mediawiki 1.26+
LicenseTemplate:Extension#license Public domain
Download
ExampleTemplate:Extension#example ShoutWiki

Translate the ShoutWiki API extension if it is available at translatewiki.net

Check usage and version matrix.

ShoutWiki API extension is a collection of ShoutWiki-specific API modules; as of 03:58, 30 May 2012 (CDT) it consists of only one module.

Installation[edit]

Warning Warning: This extension won't work on a vanilla MediaWiki install since it depends on ShoutWiki-specific code bits.
  • Download and place the file(s) in a directory called ShoutWikiAPI in your extensions/ folder.
  • Add the following code at the bottom of your LocalSettings.php:
    wfLoadExtension( 'ShoutWikiAPI' );
    
  • YesY Done - Navigate to Special:Version on your wiki to verify that the extension is successfully installed.

Modules[edit]

listwikis[edit]

  • api.php?action=query&list=listwikis — get a list of all wikis (in practise it gets the list in groups of 1000 wikis per group, IIRC)
  • api.php?action=query&list=listwikis&swdeleted=1 — also show deleted wikis
  • api.php?action=query&list=listwikis&swwid=177 — show only information about the wiki with the ID number 177
  • api.php?action=query&list=listwikis&swfrom=100&swto=150 — show the wikis with IDs from 100 to 150
  • api.php?action=query&list=listwikis&swfrom=10000&swto=15000&swlang=de — show the German (language code de) wikis that have an ID number between 10000 and 15000
  • api.php?action=query&list=listwikis&swcountonly=1 — show only the amount of wikis and nothing else (equivalent to the SQL query SELECT COUNT(*) FROM wiki_list WHERE wl_deleted = 0;)
  • api.php?action=query&list=listwikis&swdeleted=1&swcountonly=1 — show total amount of wikis, including deleted ones, and nothing else (equivalent to the SQL query SELECT COUNT(*) FROM wiki_list;)