Class: MediaWiktory::Wikipedia::Actions::Feedcontributions
- Defined in:
- lib/mediawiktory/wikipedia/actions/feedcontributions.rb
Overview
Returns a user contributions feed.
Usage:
api.feedcontributions.feedformat(value).perform # returns string with raw output
# or
api.feedcontributions.feedformat(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
-
#deletedonly ⇒ self
Show only deleted contributions.
-
#feedformat(value) ⇒ self
The format of the feed.
-
#hideminor ⇒ self
Hide minor edits.
-
#month(value) ⇒ self
From month (and earlier).
-
#namespace(value) ⇒ self
Which namespace to filter the contributions by.
-
#newonly ⇒ self
Only show edits that are page creations.
-
#showsizediff ⇒ self
Disabled due to miser mode.
-
#tagfilter(*values) ⇒ self
Filter contributions that have these tags.
-
#toponly ⇒ self
Only show edits that are the latest revisions.
-
#user(value) ⇒ self
What users to get the contributions for.
-
#year(value) ⇒ self
From year (and earlier).
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
#deletedonly ⇒ self
Show only deleted contributions.
88 89 90 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 88 def deletedonly() merge(deletedonly: 'true') end |
#feedformat(value) ⇒ self
The format of the feed.
26 27 28 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 26 def feedformat(value) _feedformat(value) or fail ArgumentError, "Unknown value for feedformat: #{value}" end |
#hideminor ⇒ self
Hide minor edits.
109 110 111 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 109 def hideminor() merge(hideminor: 'true') end |
#month(value) ⇒ self
From month (and earlier).
68 69 70 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 68 def month(value) merge(month: value.to_s) end |
#namespace(value) ⇒ self
Which namespace to filter the contributions by.
47 48 49 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 47 def namespace(value) _namespace(value) or fail ArgumentError, "Unknown value for namespace: #{value}" end |
#newonly ⇒ self
Only show edits that are page creations.
102 103 104 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 102 def newonly() merge(newonly: 'true') end |
#showsizediff ⇒ self
Disabled due to miser mode.
116 117 118 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 116 def showsizediff() merge(showsizediff: 'true') end |
#tagfilter(*values) ⇒ self
Filter contributions that have these tags.
76 77 78 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 76 def tagfilter(*values) values.inject(self) { |res, val| res._tagfilter(val) or fail ArgumentError, "Unknown value for tagfilter: #{val}" } end |
#toponly ⇒ self
Only show edits that are the latest revisions.
95 96 97 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 95 def toponly() merge(toponly: 'true') end |
#user(value) ⇒ self
What users to get the contributions for.
39 40 41 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 39 def user(value) merge(user: value.to_s) end |
#year(value) ⇒ self
From year (and earlier).
60 61 62 |
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 60 def year(value) merge(year: value.to_s) end |