Module: MediaWiktory::Wikipedia::Modules::GGettingstartedgetpages

Defined in:
lib/mediawiktory/wikipedia/modules/g-gettingstartedgetpages.rb

Overview

This API is for getting a list of one or more pages related to a particular GettingStarted task. Generator module: for fetching pages corresponding to request.

The "submodule" (MediaWiki API term) is included in action after setting some param, providing additional tweaking for this param. Example (for Actions::Query and its submodules):

api.query             # returns Actions::Query
   .prop(:revisions)  # adds prop=revisions to action URL, and includes Modules::Revisions into action
   .limit(10)         # method of Modules::Revisions, adds rvlimit=10 to URL

All submodule's parameters are documented as its public methods, see below.

Instance Method Summary collapse

Instance Method Details

#count(value) ⇒ self

Requested count; will attempt to fetch this exact number, but may fetch fewer if no more are found after multiple attempts

Parameters:

  • value (Integer)

Returns:

  • (self)


41
42
43
# File 'lib/mediawiktory/wikipedia/modules/g-gettingstartedgetpages.rb', line 41

def count(value)
  merge(ggsgpcount: value.to_s)
end

#excludedtitle(value) ⇒ self

Full title of a page to exclude from the list; also used as the base title for recommendations based on a given page

Parameters:

  • value (String)

Returns:

  • (self)


33
34
35
# File 'lib/mediawiktory/wikipedia/modules/g-gettingstartedgetpages.rb', line 33

def excludedtitle(value)
  merge(ggsgpexcludedtitle: value.to_s)
end

#taskname(value) ⇒ self

Task name, generally either "copyedit" (copy-editing suggestions) or "morelike" (pages similar to the base page/excluded title)

Parameters:

  • value (String)

Returns:

  • (self)


25
26
27
# File 'lib/mediawiktory/wikipedia/modules/g-gettingstartedgetpages.rb', line 25

def taskname(value)
  merge(ggsgptaskname: value.to_s)
end