mediawiki
Wrapper for the MediaWiki API
Note: The MediaWiki API is very extensive, and the full scope is beyond what I have free time for. Contributions are very welcome.
Installation
-
Add the dependency to your
shard.yml
:dependencies: mediawiki: github: HCLarsen/mediawiki
-
Run
shards install
Usage
require "mediawiki"
client = Wikipedia::Client.new("en.wikipedia.org")
page = client.get_page("Cementite")
page.title #=> "Cementite"
category = client.get_category("Iron compounds")
category.pages.size #=> 105
Development
- Add classes and methods for other API endpoints.
Contributing
- Fork it (https://github.com/HCLarsen/mediawiki/fork)
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request
Contributors
- Chris Larsen - creator and maintainer