Module: MediaWiktory::Wikipedia::Modules::GAllcategories
- Defined in:
- lib/mediawiktory/wikipedia/modules/g-allcategories.rb
Overview
Enumerate all categories. Generator module: for fetching pages corresponding to request.
The "submodule" (MediaWiki API term) is included in action after setting some param, providing additional tweaking for this param. Example (for Actions::Query and its submodules):
api.query # returns Actions::Query
.prop(:revisions) # adds prop=revisions to action URL, and includes Modules::Revisions into action
.limit(10) # method of Modules::Revisions, adds rvlimit=10 to URL
All submodule's parameters are documented as its public methods, see below.
Instance Method Summary collapse
-
#continue(value) ⇒ self
When more results are available, use this to continue.
-
#dir(value) ⇒ self
Direction to sort in.
-
#from(value) ⇒ self
The category to start enumerating from.
-
#limit(value) ⇒ self
How many categories to return.
-
#max(value) ⇒ self
Only return categories with at most this many members.
-
#min(value) ⇒ self
Only return categories with at least this many members.
-
#prefix(value) ⇒ self
Search for all category titles that begin with this value.
-
#to(value) ⇒ self
The category to stop enumerating at.
Instance Method Details
#continue(value) ⇒ self
When more results are available, use this to continue.
33 34 35 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 33 def continue(value) merge(gaccontinue: value.to_s) end |
#dir(value) ⇒ self
Direction to sort in.
57 58 59 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 57 def dir(value) _dir(value) or fail ArgumentError, "Unknown value for dir: #{value}" end |
#from(value) ⇒ self
The category to start enumerating from.
25 26 27 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 25 def from(value) merge(gacfrom: value.to_s) end |
#limit(value) ⇒ self
How many categories to return.
86 87 88 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 86 def limit(value) merge(gaclimit: value.to_s) end |
#max(value) ⇒ self
Only return categories with at most this many members.
78 79 80 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 78 def max(value) merge(gacmax: value.to_s) end |
#min(value) ⇒ self
Only return categories with at least this many members.
70 71 72 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 70 def min(value) merge(gacmin: value.to_s) end |
#prefix(value) ⇒ self
Search for all category titles that begin with this value.
49 50 51 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 49 def prefix(value) merge(gacprefix: value.to_s) end |
#to(value) ⇒ self
The category to stop enumerating at.
41 42 43 |
# File 'lib/mediawiktory/wikipedia/modules/g-allcategories.rb', line 41 def to(value) merge(gacto: value.to_s) end |