Class: MediaWiktory::Wikipedia::Actions::Pagetriagelist

Inherits:
Get
  • Object
show all
Defined in:
lib/mediawiktory/wikipedia/actions/pagetriagelist.rb

Overview

Get a list of page IDs for building a PageTriage queue.

Usage:

api.pagetriagelist.page_id(value).perform # returns string with raw output
# or
api.pagetriagelist.page_id(value).response # returns output parsed and wrapped into Response object

See Base for generic explanation of working with MediaWiki actions and Response for working with action responses.

All action's parameters are documented as its public methods, see below.

Instance Method Summary collapse

Methods inherited from Get

#perform

Methods inherited from Base

#inspect, #merge, #name, #perform, #response, #to_h, #to_param, #to_url

Methods included from GlobalParams

#assert, #assertuser, #centralauthtoken, #curtimestamp, #errorformat, #errorlang, #errorsuselocal, #format, #maxage, #maxlag, #origin, #requestid, #responselanginfo, #servedby, #smaxage, #uselang

Instance Method Details

#blocked_usersself

Whether to show only pages created by blocked users.

Returns:

  • (self)


129
130
131
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 129

def blocked_users()
  merge(blocked_users: 'true')
end

#dir(value) ⇒ self

The direction the list should be sorted in - oldestfirst or newestfirst.

Parameters:

  • value (String)

Returns:

  • (self)


93
94
95
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 93

def dir(value)
  merge(dir: value.to_s)
end

#limit(value) ⇒ self

The maximum number of results to return.

Parameters:

  • value (Integer)

Returns:

  • (self)


69
70
71
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 69

def limit(value)
  merge(limit: value.to_s)
end

#namespace(value) ⇒ self

What namespace to pull pages from.

Parameters:

  • value (Integer)

Returns:

  • (self)


101
102
103
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 101

def namespace(value)
  merge(namespace: value.to_s)
end

#no_categoryself

Whether to show only pages with no category.

Returns:

  • (self)


108
109
110
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 108

def no_category()
  merge(no_category: 'true')
end

Whether to show only pages with no inbound links.

Returns:

  • (self)


115
116
117
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 115

def no_inbound_links()
  merge(no_inbound_links: 'true')
end

#non_autoconfirmed_usersself

Whether to show only pages created by non auto confirmed users.

Returns:

  • (self)


122
123
124
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 122

def non_autoconfirmed_users()
  merge(non_autoconfirmed_users: 'true')
end

#offset(value) ⇒ self

Timestamp to start from.

Parameters:

  • value (Integer)

Returns:

  • (self)


77
78
79
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 77

def offset(value)
  merge(offset: value.to_s)
end

#page_id(value) ⇒ self

Return data for the specified page IDs, ignoring other parameters.

Parameters:

  • value (Integer)

Returns:

  • (self)


26
27
28
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 26

def page_id(value)
  merge(page_id: value.to_s)
end

#pageoffset(value) ⇒ self

Page ID to start from (requires offset param to be passed as well).

Parameters:

  • value (Integer)

Returns:

  • (self)


85
86
87
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 85

def pageoffset(value)
  merge(pageoffset: value.to_s)
end

#showbotsself

Whether to show only bot edits.

Returns:

  • (self)


33
34
35
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 33

def showbots()
  merge(showbots: 'true')
end

#showdeletedself

Whether to include "proposed for deleted".

Returns:

  • (self)


61
62
63
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 61

def showdeleted()
  merge(showdeleted: 'true')
end

#showredirsself

Whether to include redirects.

Returns:

  • (self)


40
41
42
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 40

def showredirs()
  merge(showredirs: 'true')
end

#showreviewedself

Whether to include reviewed.

Returns:

  • (self)


47
48
49
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 47

def showreviewed()
  merge(showreviewed: 'true')
end

#showunreviewedself

Whether to include unreviewed.

Returns:

  • (self)


54
55
56
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 54

def showunreviewed()
  merge(showunreviewed: 'true')
end

#username(value) ⇒ self

Show only pages created by username.

Parameters:

  • value (String)

Returns:

  • (self)


137
138
139
# File 'lib/mediawiktory/wikipedia/actions/pagetriagelist.rb', line 137

def username(value)
  merge(username: value.to_s)
end