Class: MediaWiktory::Wikipedia::Actions::Titleblacklist
- Defined in:
- lib/mediawiktory/wikipedia/actions/titleblacklist.rb
Overview
Validate an article title, filename, or username against the TitleBlacklist.
Usage:
api.titleblacklist.title(value).perform # returns string with raw output
# or
api.titleblacklist.title(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
-
#action(value) ⇒ self
The action to be checked.
-
#nooverride ⇒ self
Don't try to override the titleblacklist.
-
#title(value) ⇒ self
The string to validate against the blacklist.
Methods inherited from Get
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
#action(value) ⇒ self
The action to be checked.
34 35 36 |
# File 'lib/mediawiktory/wikipedia/actions/titleblacklist.rb', line 34 def action(value) _action(value) or fail ArgumentError, "Unknown value for action: #{value}" end |
#nooverride ⇒ self
Don't try to override the titleblacklist.
46 47 48 |
# File 'lib/mediawiktory/wikipedia/actions/titleblacklist.rb', line 46 def nooverride() merge(tbnooverride: 'true') end |
#title(value) ⇒ self
The string to validate against the blacklist.
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/titleblacklist.rb', line 26 def title(value) merge(tbtitle: value.to_s) end |