Module: MediaWiki::Query::Lists::Miscellaneous
- Included in:
- MediaWiki::Query::Lists
- Defined in:
- lib/mediawiki/query/lists/miscellaneous.rb
Instance Method Summary collapse
-
#get_random_pages(limit = 1, namespace = 0) ⇒ Array<String>
Returns an array of random pages titles.
-
#get_tags(limit = @query_limit_default) ⇒ Array<String>
Gets the valid change tags on the wiki.
Instance Method Details
#get_random_pages(limit = 1, namespace = 0) ⇒ Array<String>
Returns an array of random pages titles.
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/mediawiki/query/lists/miscellaneous.rb', line 13 def get_random_pages(limit = 1, namespace = 0) params = { list: 'random', rnlimit: get_limited(limit, 10, 20), rnnamespace: validate_namespace(namespace) } continue = @use_continuation @use_continuation = false ret = query_ary(params, 'random', 'title') @use_continuation = continue ret end |
#get_tags(limit = @query_limit_default) ⇒ Array<String>
Gets the valid change tags on the wiki.
32 33 34 35 36 37 38 39 |
# File 'lib/mediawiki/query/lists/miscellaneous.rb', line 32 def (limit = @query_limit_default) params = { list: 'tags', tglimit: get_limited(limit) } query_ary(params, 'tags', 'name') end |