class MediaWiktory::Wikipedia::Actions::Featuredfeed
Returns a featured content feed.
Usage:
“`ruby api.featuredfeed.feedformat(value).perform # returns string with raw output # or api.featuredfeed.feedformat(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
_feed(value)
click to toggle source
@private
Calls superclass method
# File lib/mediawiktory/wikipedia/actions/featuredfeed.rb, line 44 def _feed(value) defined?(super) && super || ["potd", "featured", "onthisday"].include?(value.to_s) && merge(feed: value.to_s) end
_feedformat(value)
click to toggle source
@private
Calls superclass method
# File lib/mediawiktory/wikipedia/actions/featuredfeed.rb, line 31 def _feedformat(value) defined?(super) && super || ["rss", "atom"].include?(value.to_s) && merge(feedformat: value.to_s) end
feed(value)
click to toggle source
Feed name.
@param value [String] One of “potd”, “featured”, “onthisday”. @return [self]
# File lib/mediawiktory/wikipedia/actions/featuredfeed.rb, line 39 def feed(value) _feed(value) or fail ArgumentError, "Unknown value for feed: #{value}" end
feedformat(value)
click to toggle source
The format of the feed.
@param value [String] One of “rss”, “atom”. @return [self]
# File lib/mediawiktory/wikipedia/actions/featuredfeed.rb, line 26 def feedformat(value) _feedformat(value) or fail ArgumentError, "Unknown value for feedformat: #{value}" end
language(value)
click to toggle source
Feed language code. Ignored by some feeds.
@param value [String] @return [self]
# File lib/mediawiktory/wikipedia/actions/featuredfeed.rb, line 52 def language(value) merge(language: value.to_s) end