Class: MediaWiktory::Wikipedia::Actions::Featuredfeed
- Defined in:
- lib/mediawiktory/wikipedia/actions/featuredfeed.rb
Overview
Returns a featured content feed.
Usage:
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 Response for working with action responses.
All action's parameters are documented as its public methods, see below.
Instance Method Summary collapse
-
#feed(value) ⇒ self
Feed name.
-
#feedformat(value) ⇒ self
The format of the feed.
-
#language(value) ⇒ self
Feed language code.
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
#feed(value) ⇒ self
Feed name.
39 40 41 |
# 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) ⇒ self
The format of the feed.
26 27 28 |
# 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) ⇒ self
Feed language code. Ignored by some feeds.
52 53 54 |
# File 'lib/mediawiktory/wikipedia/actions/featuredfeed.rb', line 52 def language(value) merge(language: value.to_s) end |