Class Index | File Index

Classes


Class SarissaMediaWikiContext


Defined in: sarissa-mediawiki.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
SarissaMediaWikiContext(apiUrl, callback)
Class that can be used to perform queries against a MediaWiki instance
Method Summary
Method Attributes Method Name and Description
 
doArticleCategoriesGet(sFor, iLimit, callback)
Asynchronously obtain the Wiki categories an article belongs to, then pass those to the given callback function as JSON data.
 
doArticleGet(sFor, iLimit)
Asynchronously obtain an article from the Wiki, then pass it to the given callback function as JSON data.
 
doBacklinksGet(sFor, iLimit, callback)
Asynchronously obtain an article's backlinks from the Wiki, then pass those to the given callback function as JSON data.
 
doCategorySearch(sFor, iLimit, callback)
Asynchronously obtain the articles belonging to a category from the Wiki, then pass those to the given callback function as JSON data.
 
doSearch(sFor, iLimit, callback)
Asynchronously perform a Wiki Search, passing the results to the given callback function as JSON data.
Class Detail
SarissaMediaWikiContext(apiUrl, callback)
Class that can be used to perform queries against a MediaWiki instance
Parameters:
{String} apiUrl
the base API URL, e.g. http://en.wikipedia.org/w/api.php
{Function} callback
the callback function to use
Requires:
Sarissa
Method Detail
doArticleCategoriesGet(sFor, iLimit, callback)
Asynchronously obtain the Wiki categories an article belongs to, then pass those to the given callback function as JSON data. This method does any required URL encoding for you.
Parameters:
{String} sFor
the article name
{int} iLimit
the maximum number of results to retreive
{Function} callback
the callback function to use

doArticleGet(sFor, iLimit)
Asynchronously obtain an article from the Wiki, then pass it to the given callback function as JSON data. This method does any required URL encoding for you.
Parameters:
{String} sFor
the article name
{int} iLimit
the maximum number of results to retreive

doBacklinksGet(sFor, iLimit, callback)
Asynchronously obtain an article's backlinks from the Wiki, then pass those to the given callback function as JSON data. This method does any required URL encoding for you.
Parameters:
{String} sFor
the article name
{int} iLimit
the maximum number of results to retreive
{Function} callback
the callback function to use

doCategorySearch(sFor, iLimit, callback)
Asynchronously obtain the articles belonging to a category from the Wiki, then pass those to the given callback function as JSON data. This method does any required URL encoding for you.
Parameters:
{String} sFor
the article name
{int} iLimit
the maximum number of results to retreive
{Function} callback
the callback function to use

doSearch(sFor, iLimit, callback)
Asynchronously perform a Wiki Search, passing the results to the given callback function as JSON data. This method does any required URL encoding for you.
Parameters:
{String} sFor
the terms to look for
{int} iLimit
the maximum number of results to retreive
{Function} callback
the callback function to use

Documentation generated by JsDoc Toolkit 2.0.2 on Tue May 22 2012 13:01:30 GMT+0300 (EEST)