# Wiki Elixir

This project provides unofficial Elixir client modules for Wikipedia and other MediaWiki sites.

[![pipeline status](]( [![coverage report](](

Currently supported,
* `Wiki.Action` to access the [Action API](
This is a rich set of commands to query or edit almost anything on a wiki.
* `Wiki.EventStreams` to access [EventStreams](,
a real-time feed of events.
* `Wiki.Ores` to access the [ORES]( service [API](,
machine-learning models for estimating revision and edit quality.

Considered for a future version,
* Client for the many Wikimedia [REST API]( )s served through RESTBase.
See [issue #2](
* Built-in [REST API](

Everything you'll find here is beta-quality, please suggest improvements.  Expect the
public interface to change, this project uses [semantic versioning]( and
the "0.x" releases should be taken literally.

## Installation

Install this package by adding `wiki_elixir` to your dependencies in `mix.exs`,

def deps do
    {:wiki_elixir, "~> 0.1"}

Documentation is generated with `mix docs`.

## Usage

A simple call to the action API,

|> Wiki.Action.get(%{
  action: :query,
  meta: :siteinfo,
  siprop: :statistics
|> (&(&1.result)).()
|> IO.inspect()

See each module for more detailed examples.

The `:format` parameter always defaults to `:json` unless overridden.

## Development

The project's homepage is currently [on GitLab](
To contribute, please submit an issue or a merge request.

The easiest way to run linters is to install the pre-push git hook using,

```shell script
mix git_hooks.install