class MediaWiktory::Wikipedia::Actions::Refresheducation
Rebuild summary data of Education Program objects.
Usage:
“`ruby api.refresheducation.ids(value).perform # returns string with raw output # or api.refresheducation.ids(value).response # returns output parsed and wrapped into Response
object “`
See {Base} for generic explanation of working with MediaWiki actions and {MediaWiktory::Wikipedia::Response} for working with action responses.
All action's parameters are documented as its public methods, see below.
Public Instance Methods
_ids(value)
click to toggle source
@private
# File lib/mediawiktory/wikipedia/actions/refresheducation.rb, line 31 def _ids(value) merge(ids: value.to_s, replace: false) end
_type(value)
click to toggle source
@private
Calls superclass method
# File lib/mediawiktory/wikipedia/actions/refresheducation.rb, line 44 def _type(value) defined?(super) && super || ["org", "course", "student"].include?(value.to_s) && merge(type: value.to_s) end
ids(*values)
click to toggle source
The IDs of the objects to refresh.
@param values [Array<Integer>] @return [self]
# File lib/mediawiktory/wikipedia/actions/refresheducation.rb, line 26 def ids(*values) values.inject(self) { |res, val| res._ids(val) } end
token(value)
click to toggle source
A “csrf” token retrieved from action=query&meta=tokens
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/refresheducation.rb, line 52 def token(value) merge(token: value.to_s) end
type(value)
click to toggle source
Type of object to refresh.
@param value [String] One of “org”, “course”, “student”. @return [self]
# File lib/mediawiktory/wikipedia/actions/refresheducation.rb, line 39 def type(value) _type(value) or fail ArgumentError, "Unknown value for type: #{value}" end