I can even document myself :-)
This commit is contained in:
parent
1b7b43b1e4
commit
295e083cc9
|
@ -2,7 +2,7 @@
|
|||
|
||||
==MediaWiki==
|
||||
|
||||
===MediaWiki::dotfile===
|
||||
===MediaWiki::dotfile(myrealm=nil)===
|
||||
|
||||
dotfile function reads the user's MediaWiki config and creates a Wiki instance.
|
||||
|
||||
|
@ -29,7 +29,7 @@ Article name, will be refreshed upon Article#reload
|
|||
Article text, will be set by Article#reload
|
||||
|
||||
|
||||
===MediaWiki::Article::new===
|
||||
===MediaWiki::Article::new(wiki, name, section = nil, load_text=true)===
|
||||
|
||||
Create a new Article instance
|
||||
|
||||
|
@ -43,7 +43,7 @@ Create a new Article instance
|
|||
: [Boolean] Invoke Article#reload to retrieve Article#text
|
||||
|
||||
|
||||
===MediaWiki::Article#delete===
|
||||
===MediaWiki::Article#delete(reason)===
|
||||
|
||||
Delete this article
|
||||
|
||||
|
@ -51,7 +51,7 @@ Delete this article
|
|||
: [String] Delete reason
|
||||
|
||||
|
||||
===MediaWiki::Article#full_name===
|
||||
===MediaWiki::Article#full_name()===
|
||||
|
||||
Return the full article name
|
||||
|
||||
|
@ -61,7 +61,7 @@ This will only return @name, but may be overriden by descendants to include name
|
|||
: [String] Full name
|
||||
|
||||
|
||||
===MediaWiki::Article#protect===
|
||||
===MediaWiki::Article#protect(reason, moves_only=false)===
|
||||
|
||||
Protect this article
|
||||
|
||||
|
@ -69,12 +69,12 @@ Protect this article
|
|||
: [String] Protect reason
|
||||
|
||||
|
||||
===MediaWiki::Article#reload===
|
||||
===MediaWiki::Article#reload()===
|
||||
|
||||
Reload Article#text, should be done by Article#initialize.
|
||||
|
||||
|
||||
===MediaWiki::Article#submit===
|
||||
===MediaWiki::Article#submit(summary, minor_edit=false, watch_this=false)===
|
||||
|
||||
Push the '''Submit''' button
|
||||
|
||||
|
@ -88,7 +88,7 @@ Send the modified Article#text to the MediaWiki.
|
|||
: [Boolean] Watch this article
|
||||
|
||||
|
||||
===MediaWiki::Article#unprotect===
|
||||
===MediaWiki::Article#unprotect(reason)===
|
||||
|
||||
Unprotect this article
|
||||
|
||||
|
@ -96,7 +96,7 @@ Unprotect this article
|
|||
: [String] Unprotect reason
|
||||
|
||||
|
||||
===MediaWiki::Article#what_links_here===
|
||||
===MediaWiki::Article#what_links_here()===
|
||||
|
||||
What articles link to this article?
|
||||
|
||||
|
@ -104,7 +104,7 @@ What articles link to this article?
|
|||
: [Array] of [String] Article names
|
||||
|
||||
|
||||
===MediaWiki::Article#xhtml===
|
||||
===MediaWiki::Article#xhtml()===
|
||||
|
||||
Get the XHTML, will invoke Article#xhtml_reload if not already cached
|
||||
|
||||
|
@ -112,7 +112,7 @@ Get the XHTML, will invoke Article#xhtml_reload if not already cached
|
|||
: [REXML::Element] html root element
|
||||
|
||||
|
||||
===MediaWiki::Article#xhtml_reload===
|
||||
===MediaWiki::Article#xhtml_reload()===
|
||||
|
||||
Reload the xhtml, will be automatically done by Article#xhtml if not already cached.
|
||||
|
||||
|
@ -123,7 +123,7 @@ Inherited from '''Article'''
|
|||
|
||||
The Category class represents MediaWiki categories.
|
||||
|
||||
===MediaWiki::Category#articles===
|
||||
===MediaWiki::Category#articles()===
|
||||
|
||||
Which articles belong to this category?
|
||||
|
||||
|
@ -131,12 +131,12 @@ Which articles belong to this category?
|
|||
: [Array] of [String] Article names
|
||||
|
||||
|
||||
===MediaWiki::Category#full_name===
|
||||
===MediaWiki::Category#full_name()===
|
||||
|
||||
This returns the full article name prefixed with "Category:" instead of the name, which should not carry a prefix.
|
||||
|
||||
|
||||
===MediaWiki::Category#reload===
|
||||
===MediaWiki::Category#reload()===
|
||||
|
||||
Calls the reload function of the super-class (Article#reload) but removes the prefix (namespace) then.
|
||||
|
||||
|
@ -155,7 +155,7 @@ The MiniBrowser is used to perform GET and POST requests over HTTP and HTTPS, su
|
|||
|
||||
All interaction with MiniBrowser is normally done by MediaWiki::Wiki.
|
||||
|
||||
===MediaWiki::MiniBrowser::new===
|
||||
===MediaWiki::MiniBrowser::new(url)===
|
||||
|
||||
Initialize a MiniBrowser instance
|
||||
|
||||
|
@ -163,7 +163,7 @@ Initialize a MiniBrowser instance
|
|||
: [URI::HTTP] or [URI::HTTPS]
|
||||
|
||||
|
||||
===MediaWiki::MiniBrowser#add_cookie===
|
||||
===MediaWiki::MiniBrowser#add_cookie(cookies)===
|
||||
|
||||
Add cookies to the volatile cookie cache
|
||||
|
||||
|
@ -171,7 +171,7 @@ Add cookies to the volatile cookie cache
|
|||
: [Array]
|
||||
|
||||
|
||||
===MediaWiki::MiniBrowser#cookies===
|
||||
===MediaWiki::MiniBrowser#cookies()===
|
||||
|
||||
Get the cookie cache in a serialized form ready for HTTP.
|
||||
|
||||
|
@ -179,7 +179,7 @@ Get the cookie cache in a serialized form ready for HTTP.
|
|||
: [String]
|
||||
|
||||
|
||||
===MediaWiki::MiniBrowser#get_content===
|
||||
===MediaWiki::MiniBrowser#get_content(url)===
|
||||
|
||||
Perform a GET request
|
||||
|
||||
|
@ -191,7 +191,7 @@ This method accepts 10 HTTP redirects at max.
|
|||
: [String] Document
|
||||
|
||||
|
||||
===MediaWiki::MiniBrowser#post_content===
|
||||
===MediaWiki::MiniBrowser#post_content(url, data)===
|
||||
|
||||
Perform a POST request
|
||||
|
||||
|
@ -224,17 +224,17 @@ Inherited from '''Object'''
|
|||
===MediaWiki::Table#table_style (RW)===
|
||||
|
||||
|
||||
===MediaWiki::Table::new===
|
||||
===MediaWiki::Table::new( data = [], header = [] )===
|
||||
|
||||
|
||||
===MediaWiki::Table::parse===
|
||||
===MediaWiki::Table::parse( text )===
|
||||
|
||||
takes the wiki markup of a table and returns a 2-dimensional array representing the rows and columns of the table
|
||||
|
||||
TODO: fill member variables according to parsed tables
|
||||
|
||||
|
||||
===MediaWiki::Table#text===
|
||||
===MediaWiki::Table#text()===
|
||||
|
||||
|
||||
==MediaWiki::Wiki==
|
||||
|
@ -246,7 +246,7 @@ Inherited from '''Object'''
|
|||
The MiniBrowser instance used by this Wiki. This must be readable as it's used by Article and Category to fetch themselves.
|
||||
|
||||
|
||||
===MediaWiki::Wiki::new===
|
||||
===MediaWiki::Wiki::new(url, user = nil, password = nil)===
|
||||
|
||||
Initialize a new Wiki instance.
|
||||
|
||||
|
@ -258,7 +258,7 @@ Initialize a new Wiki instance.
|
|||
: [String] If not nil, log in with that MediaWiki password (see Wiki#login)
|
||||
|
||||
|
||||
===MediaWiki::Wiki#allpages===
|
||||
===MediaWiki::Wiki#allpages()===
|
||||
|
||||
Returns the pages listed on "Special:Allpages"
|
||||
|
||||
|
@ -266,7 +266,7 @@ Returns the pages listed on "Special:Allpages"
|
|||
: [Array] of [String] Articlenames
|
||||
|
||||
|
||||
===MediaWiki::Wiki#article===
|
||||
===MediaWiki::Wiki#article(name, section = nil)===
|
||||
|
||||
Return a new Article instance with given name, will be constructed with [self] (for MiniBrowser usage)
|
||||
|
||||
|
@ -276,7 +276,7 @@ Return a new Article instance with given name, will be constructed with [self] (
|
|||
: [Fixnum] Optional section number
|
||||
|
||||
|
||||
===MediaWiki::Wiki#article_url===
|
||||
===MediaWiki::Wiki#article_url(name, section = nil)===
|
||||
|
||||
Construct the URL to a specific article
|
||||
|
||||
|
@ -290,7 +290,7 @@ Often called by Article, Category, ...
|
|||
: [Fixnum] Optional section number
|
||||
|
||||
|
||||
===MediaWiki::Wiki#category===
|
||||
===MediaWiki::Wiki#category(name)===
|
||||
|
||||
Return a new Category instance with given name, will be constructed with [self] (for MiniBrowser usage)
|
||||
|
||||
|
@ -298,7 +298,7 @@ Return a new Category instance with given name, will be constructed with [self]
|
|||
: [String] Category name (to be prepended with "Category:")
|
||||
|
||||
|
||||
===MediaWiki::Wiki#login===
|
||||
===MediaWiki::Wiki#login( username, password )===
|
||||
|
||||
Log in into MediaWiki
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user