Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
zverok committed Dec 4, 2017
1 parent cf5c88e commit 15248eb
Showing 1 changed file with 16 additions and 15 deletions.
31 changes: 16 additions & 15 deletions lib/infoboxer/media_wiki.rb
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def raw(*titles, &processor)
# `(titles.count / 50.0).ceil` requests)
#
# @param titles [Array<String>] List of page titles to get.
# @param interwiki [Symbol] Identifier of other wiki, related to current, to fetch pages from.
# @param processor [Proc] Optional block to preprocess MediaWiktory query. Refer to
# [MediaWiktory::Actions::Query](http://www.rubydoc.info/gems/mediawiktory/MediaWiktory/Wikipedia/Actions/Query)
# for its API. Infoboxer assumes that the block returns new instance of `Query`, so be careful
Expand Down Expand Up @@ -157,15 +158,15 @@ def get_h(*titles, &processor)

# Receive list of parsed MediaWiki pages from specified category.
#
# **NB**: currently, this API **always** fetches all pages from
# category, there is no option to "take first 20 pages". Pages are
# fetched in 50-page batches, then parsed. So, for large category
# it can really take a while to fetch all pages.
#
# @param title [String] Category title. You can use namespaceless title (like
# `"Countries in South America"`), title with namespace (like
# `"Category:Countries in South America"`) or title with local
# namespace (like `"Catégorie:Argentine"` for French Wikipedia)
# @param limit [Integer, "max"]
# @param processor [Proc] Optional block to preprocess MediaWiktory query. Refer to
# [MediaWiktory::Actions::Query](http://www.rubydoc.info/gems/mediawiktory/MediaWiktory/Wikipedia/Actions/Query)
# for its API. Infoboxer assumes that the block returns new instance of `Query`, so be careful
# while using it.
#
# @return [Tree::Nodes<Page>] array of parsed pages.
#
Expand All @@ -179,15 +180,15 @@ def category(title, limit: 'max', &processor)
# See [MediaWiki API docs](https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bsearch)
# for details.
#
# **NB**: currently, this API **always** fetches all pages from
# category, there is no option to "take first 20 pages". Pages are
# fetched in 50-page batches, then parsed. So, for large search query
# it can really take a while to fetch all pages.
#
# @param query [String] Search query. For old installations, look at
# https://www.mediawiki.org/wiki/Help:Searching
# for search syntax. For new ones (including Wikipedia), see at
# https://www.mediawiki.org/wiki/Help:CirrusSearch.
# @param limit [Integer, "max"]
# @param processor [Proc] Optional block to preprocess MediaWiktory query. Refer to
# [MediaWiktory::Actions::Query](http://www.rubydoc.info/gems/mediawiktory/MediaWiktory/Wikipedia/Actions/Query)
# for its API. Infoboxer assumes that the block returns new instance of `Query`, so be careful
# while using it.
#
# @return [Tree::Nodes<Page>] array of parsed pages.
#
Expand All @@ -199,12 +200,12 @@ def search(query, limit: 'max', &processor)
# See [MediaWiki API docs](https://www.mediawiki.org/w/api.php?action=help&modules=query%2Bprefixsearch)
# for details.
#
# **NB**: currently, this API **always** fetches all pages from
# category, there is no option to "take first 20 pages". Pages are
# fetched in 50-page batches, then parsed. So, for large search query
# it can really take a while to fetch all pages.
#
# @param prefix [String] Page title prefix.
# @param limit [Integer, "max"]
# @param processor [Proc] Optional block to preprocess MediaWiktory query. Refer to
# [MediaWiktory::Actions::Query](http://www.rubydoc.info/gems/mediawiktory/MediaWiktory/Wikipedia/Actions/Query)
# for its API. Infoboxer assumes that the block returns new instance of `Query`, so be careful
# while using it.
#
# @return [Tree::Nodes<Page>] array of parsed pages.
#
Expand Down

0 comments on commit 15248eb

Please sign in to comment.