Module:Rfx/doc explained

This is a library for getting information about individual requests for adminship (RfA) and requests for bureaucratship (RfB) pages on the English Wikipedia. It is not meant to be used directly from wiki pages, but rather to be used by other Lua modules.

Creating new objects

First of all, the library must be loaded, like this:

local rfx = require('Module:Rfx')

Once the library is loaded, you can make a new rfx object using rfx.new. (see below).

rfx.new is used like this:

local myRfx = rfx.new(pagename)

The pagename variable should be the name of a valid RfA or RfB page, for example:

local exampleRfa = rfx.new('Wikipedia:Requests for adminship/Example')

If pagename is not specified, or the page is not a subpage of or, then rfx.new will return nil.

Methods and properties

Once you have created a new rfx object, there are a number of methods and properties that you can use. They are all read-only.

Properties
supports
supports+opposes

x 100

and rounded to the nearest integer. nil if it could not be processed.
Methods

Methods must be called with the colon syntax:

local titleObject = exampleRfa:getTitleObject

You can compare rfx objects with the == operator. This will return true only if the two objects point to the same page. tostring(rfx) will return prefixedTitle from the RfX page's title object (see the reference manual).

Expensive functions

This module makes use of the title:getContent method to fetch RfX page sources. This method will be called for each RfX page being looked up, so each use of rfx.new will count as an expensive function call. Please be aware that the library may fail for scripts which create many different RfX objects. (The current limit for the English Wikipedia is 500 expensive function calls per page.) Also, each RfX page that is looked up will count as a transclusion in .