Module: MediaWiki::Query::Lists::QueryPage

Includes:
Users
Included in:
MediaWiki::Query::Lists
Defined in:
lib/mediawiki/query/lists/querypage.rb

Instance Method Summary collapse

Methods included from Users

#get_contrib_count, #get_full_watchlist, #get_registration_time, #get_user_contributions, #get_user_gender, #get_usergroups, #get_userlists, #get_userrights

Instance Method Details

#get_ancientpages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



151
152
153
# File 'lib/mediawiki/query/lists/querypage.rb', line 151

def get_ancientpages_page(limit = @query_limit_default)
  get_querypage('Ancientpages', limit)
end

#get_brokenredirects_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



169
170
171
# File 'lib/mediawiki/query/lists/querypage.rb', line 169

def get_brokenredirects_page(limit = @query_limit_default)
  get_querypage('BrokenRedirects', limit)
end

#get_doubleredirects_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



163
164
165
# File 'lib/mediawiki/query/lists/querypage.rb', line 163

def get_doubleredirects_page(limit = @query_limit_default)
  get_querypage('DoubleRedirects', limit)
end

#get_fewestrevisions_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



139
140
141
# File 'lib/mediawiki/query/lists/querypage.rb', line 139

def get_fewestrevisions_page(limit = @query_limit_default)
  get_querypage('Fewestrevisions', limit)
end

#get_listduplicatedfiles_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



53
54
55
# File 'lib/mediawiki/query/lists/querypage.rb', line 53

def get_listduplicatedfiles_page(limit = @query_limit_default)
  get_querypage('ListDuplicatedFiles', limit)
end

#get_listredirects_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



59
60
61
# File 'lib/mediawiki/query/lists/querypage.rb', line 59

def get_listredirects_page(limit = @query_limit_default)
  get_querypage('Listredirects', limit)
end

#get_lonelypages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



145
146
147
# File 'lib/mediawiki/query/lists/querypage.rb', line 145

def get_lonelypages_page(limit = @query_limit_default)
  get_querypage('Lonelypages', limit)
end

#get_longpages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



157
158
159
# File 'lib/mediawiki/query/lists/querypage.rb', line 157

def get_longpages_page(limit = @query_limit_default)
  get_querypage('Longpages', limit)
end

#get_mostcategories_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



47
48
49
# File 'lib/mediawiki/query/lists/querypage.rb', line 47

def get_mostcategories_page(limit = @query_limit_default)
  get_querypage('Mostcategories', limit)
end

#get_mostimages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



41
42
43
# File 'lib/mediawiki/query/lists/querypage.rb', line 41

def get_mostimages_page(limit = @query_limit_default)
  get_querypage('Mostimages', limit)
end

#get_mostinterwikis_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



35
36
37
# File 'lib/mediawiki/query/lists/querypage.rb', line 35

def get_mostinterwikis_page(limit = @query_limit_default)
  get_querypage('Mostinterwikis', limit)
end

#get_mostlinked_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



17
18
19
# File 'lib/mediawiki/query/lists/querypage.rb', line 17

def get_mostlinked_page(limit = @query_limit_default)
  get_querypage('Mostlinked', limit)
end

#get_mostlinkedcategories_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



29
30
31
# File 'lib/mediawiki/query/lists/querypage.rb', line 29

def get_mostlinkedcategories_page(limit = @query_limit_default)
  get_querypage('Mostlinkedcategories', limit)
end

#get_mostlinkedtemplates_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



23
24
25
# File 'lib/mediawiki/query/lists/querypage.rb', line 23

def get_mostlinkedtemplates_page(limit = @query_limit_default)
  get_querypage('Mostlinkedtemplates', limit)
end

#get_mostrevisions_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



11
12
13
# File 'lib/mediawiki/query/lists/querypage.rb', line 11

def get_mostrevisions_page(limit = @query_limit_default)
  get_querypage('Mostrevisions', limit)
end

#get_querypage(page, limit = @query_limit_default) ⇒ Array<String>

Performs a QueryPage request.

Parameters:

  • page (String)

    The special page (not including Special:) to query.

  • limit (Integer) (defaults to: @query_limit_default)

    The limit.

Returns:

  • (Array<String>)

    All of the page titles in the querypage.

See Also:

Since:

  • 0.10.0



179
180
181
182
183
184
185
186
187
188
189
# File 'lib/mediawiki/query/lists/querypage.rb', line 179

def get_querypage(page, limit = @query_limit_default)
  params = {
    list: 'querypage',
    qppage: page,
    qplimit: get_limited(limit)
  }

  query(params) do |return_val, query|
    return_val.concat(query['querypage']['results'].collect { |result| result['title'] })
  end
end

#get_shortpages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



127
128
129
# File 'lib/mediawiki/query/lists/querypage.rb', line 127

def get_shortpages_page(limit = @query_limit_default)
  get_querypage('Shortpages', limit)
end

#get_uncategorizedcategories_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



121
122
123
# File 'lib/mediawiki/query/lists/querypage.rb', line 121

def get_uncategorizedcategories_page(limit = @query_limit_default)
  get_querypage('Uncategorizedcategories', limit)
end

#get_uncategorizedpages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



115
116
117
# File 'lib/mediawiki/query/lists/querypage.rb', line 115

def get_uncategorizedpages_page(limit = @query_limit_default)
  get_querypage('Uncategorizedpages', limit)
end

#get_uncategorizedtemplates_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



109
110
111
# File 'lib/mediawiki/query/lists/querypage.rb', line 109

def get_uncategorizedtemplates_page(limit = @query_limit_default)
  get_querypage('Uncategorizedtemplates', limit)
end

#get_unusedcategories_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



103
104
105
# File 'lib/mediawiki/query/lists/querypage.rb', line 103

def get_unusedcategories_page(limit = @query_limit_default)
  get_querypage('Unusedcategories', limit)
end

#get_unusedtemplates_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



97
98
99
# File 'lib/mediawiki/query/lists/querypage.rb', line 97

def get_unusedtemplates_page(limit = @query_limit_default)
  get_querypage('Unusedtemplates', limit)
end

#get_unwatchedpages_page(limit = @query_limit_default) ⇒ Nil

Returns If the user does not have the necessary rights.

Returns:

  • (Nil)

    If the user does not have the necessary rights.

See Also:

Since:

  • 0.10.0



90
91
92
93
# File 'lib/mediawiki/query/lists/querypage.rb', line 90

def get_unwatchedpages_page(limit = @query_limit_default)
  rights = get_userrights
  rights && rights.include?('unwatchedpages') ? get_querypage('Unwatchedpages', limit) : nil
end

#get_wantedcategories_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



83
84
85
# File 'lib/mediawiki/query/lists/querypage.rb', line 83

def get_wantedcategories_page(limit = @query_limit_default)
  get_querypage('Wantedcategories', limit)
end

#get_wantedfiles_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



77
78
79
# File 'lib/mediawiki/query/lists/querypage.rb', line 77

def get_wantedfiles_page(limit = @query_limit_default)
  get_querypage('Wantedfiles', limit)
end

#get_wantedpages_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



71
72
73
# File 'lib/mediawiki/query/lists/querypage.rb', line 71

def get_wantedpages_page(limit = @query_limit_default)
  get_querypage('Wantedpages', limit)
end

#get_wantedtemplates_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



65
66
67
# File 'lib/mediawiki/query/lists/querypage.rb', line 65

def get_wantedtemplates_page(limit = @query_limit_default)
  get_querypage('Wantedtemplates', limit)
end

#get_withoutinterwiki_page(limit = @query_limit_default) ⇒ Object

See Also:

Since:

  • 0.10.0



133
134
135
# File 'lib/mediawiki/query/lists/querypage.rb', line 133

def get_withoutinterwiki_page(limit = @query_limit_default)
  get_querypage('Withoutinterwiki', limit)
end