MediaWiki-Keiki
A Ruby API client for the MediaWiki API
Features
Query the WikiMedia API, returning JSON documents
- Multiple pages per query supported
Retrieve data from WikiMedia pages, including
- Title
- Full text
- Full text as HTML
- Short text summary
Installation
Install as a ruby gem
$ gem install mediawiki-keiki
Or add it to your application's Gemfile
:
gem 'mediawiki-gateway'
Usage
Create a simple query with a single page
query = WikiMedia::Query.new('foo')
Create a query with multiple pages
query = WikiMedia::Query.new('foo|bar')
Retrieve a page from a query
foo_page = query.pages['foo']
Get the summary of a page
puts foo_page.summary
Get the title of a page
puts foo_page.title