Class: MediaWiktory::Wikipedia::Actions::Feedcontributions

Inherits:
Get
  • Object
show all
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

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

#deletedonlyself

Show only deleted contributions.

Returns:

  • (self)


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.

Parameters:

  • value (String)

    One of "rss", "atom".

Returns:

  • (self)


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

#hideminorself

Hide minor edits.

Returns:

  • (self)


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).

Parameters:

  • value (Integer)

Returns:

  • (self)


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.

Parameters:

  • value (String)

    One of "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "100", "101", "108", "109", "118", "119", "446", "447", "710", "711", "828", "829", "2300", "2301", "2302", "2303".

Returns:

  • (self)


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

#newonlyself

Only show edits that are page creations.

Returns:

  • (self)


102
103
104
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 102

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

#showsizediffself

Disabled due to miser mode.

Returns:

  • (self)


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.

Parameters:

  • values (Array<String>)

    Allowed values: "ProveIt edit", "WPCleaner", "huggle", "large plot addition", "Possible disruption", "Newer user possibly adding unreferenced or improperly referenced material", "possible vandalism", "contenttranslation-needcheck", "possible link spam", "wikilinks removed", "External Link added to disambiguation page", "canned edit summary", "new blank article", "extraneous markup", "de-userfying", "Possible self promotion in userspace", "discretionary sanctions alert", "image added to template", "nowiki added", "userspace spam", "changing height or weight", "possible libel or vandalism", "End of page text", "non-English content", "Extraneous formatting", "reverting anti-vandal bot", "Possible vandalism", "Rapid reverts", "adding email address", "nonsense characters", "removal of copyvio templates", "bad external", "large unwikified new article", "removal of articles for deletion template", "Section blanking", "possible cut and paste move", "unusual redirect", "coi-spam", "autobiography", "repeating characters", "categories removed", "removal of Category:Living People", "very short new article", "reference list removal", "references removed", "image template removal", "shouting", "talk page blanking", "blanking", "removal of speedy deletion templates", "self-renaming and bad user talk moves", "mw-contentmodelchange", "massmessage-delivery", "visualeditor", "visualeditor-needcheck", "visualeditor-switched", "visualeditor-wikitext", "wikilove", "mobile edit", "mobile app edit", "mobile web edit", "HHVM", "contenttranslation", "OAuth CID: 115", "OAuth CID: 142", "OAuth CID: 144", "OAuth CID: 150", "OAuth CID: 151", "OAuth CID: 154", "OAuth CID: 159", "OAuth CID: 194", "OAuth CID: 206", "OAuth CID: 21", "OAuth CID: 211", "OAuth CID: 212", "OAuth CID: 218", "OAuth CID: 236", "OAuth CID: 239", "OAuth CID: 251", "OAuth CID: 252", "OAuth CID: 259", "OAuth CID: 261", "OAuth CID: 263", "OAuth CID: 274", "OAuth CID: 278", "OAuth CID: 285", "OAuth CID: 297", "OAuth CID: 306", "OAuth CID: 314", "OAuth CID: 320", "OAuth CID: 376", "OAuth CID: 410", "OAuth CID: 429", "OAuth CID: 473", "OAuth CID: 540", "OAuth CID: 542", "OAuth CID: 543", "OAuth CID: 563", "OAuth CID: 593", "OAuth CID: 60", "OAuth CID: 612", "OAuth CID: 628", "OAuth CID: 64", "OAuth CID: 651", "OAuth CID: 67", "OAuth CID: 670", "OAuth CID: 678", "OAuth CID: 679", "OAuth CID: 76", "OAuth CID: 817", "OAuth CID: 85", "OAuth CID: 99".

Returns:

  • (self)


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

#toponlyself

Only show edits that are the latest revisions.

Returns:

  • (self)


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.

Parameters:

  • value (String)

Returns:

  • (self)


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).

Parameters:

  • value (Integer)

Returns:

  • (self)


60
61
62
# File 'lib/mediawiktory/wikipedia/actions/feedcontributions.rb', line 60

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