Class: MediaWiktory::Wikipedia::Actions::Feedrecentchanges

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

Overview

Returns a recent changes feed.

Usage:

api.feedrecentchanges.feedformat(value).perform # returns string with raw output
# or
api.feedrecentchanges.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

#associatedself

Include associated (talk or main) namespace.

Returns:

  • (self)


58
59
60
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 58

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

#days(value) ⇒ self

Days to limit the results to.

Parameters:

  • value (Integer)

Returns:

  • (self)


66
67
68
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 66

def days(value)
  merge(days: value.to_s)
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/feedrecentchanges.rb', line 26

def feedformat(value)
  _feedformat(value) or fail ArgumentError, "Unknown value for feedformat: #{value}"
end

#from(value) ⇒ self

Show changes since then.

Parameters:

  • value (Time)

Returns:

  • (self)


82
83
84
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 82

def from(value)
  merge(from: value.iso8601)
end

#hideanonsself

Hide changes made by anonymous users.

Returns:

  • (self)


103
104
105
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 103

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

#hidebotsself

Hide changes made by bots.

Returns:

  • (self)


96
97
98
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 96

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

#hidecategorizationself

Hide category membership changes.

Returns:

  • (self)


131
132
133
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 131

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

#hideliuself

Hide changes made by registered users.

Returns:

  • (self)


110
111
112
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 110

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

#hideminorself

Hide minor changes.

Returns:

  • (self)


89
90
91
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 89

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

#hidemyselfself

Hide changes made by the current user.

Returns:

  • (self)


124
125
126
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 124

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

#hidepatrolledself

Hide patrolled changes.

Returns:

  • (self)


117
118
119
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 117

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

#invertself

All namespaces but the selected one.

Returns:

  • (self)


51
52
53
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 51

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

#limit(value) ⇒ self

Maximum number of results to return.

Parameters:

  • value (Integer)

Returns:

  • (self)


74
75
76
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 74

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

#namespace(value) ⇒ self

Namespace to limit the results to.

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)


39
40
41
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 39

def namespace(value)
  _namespace(value) or fail ArgumentError, "Unknown value for namespace: #{value}"
end

#showlinkedtoself

Show changes on pages linked to the selected page instead.

Returns:

  • (self)


154
155
156
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 154

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

#tagfilter(value) ⇒ self

Filter by tag.

Parameters:

  • value (String)

Returns:

  • (self)


139
140
141
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 139

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

#target(value) ⇒ self

Show only changes on pages linked from this page.

Parameters:

  • value (String)

Returns:

  • (self)


147
148
149
# File 'lib/mediawiktory/wikipedia/actions/feedrecentchanges.rb', line 147

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