Crates.io | mwapi |
lib.rs | mwapi |
version | |
source | src |
created_at | 2021-06-18 07:00:06.025524 |
updated_at | 2024-11-23 13:08:47.117334 |
description | A MediaWiki API client library |
homepage | https://www.mediawiki.org/wiki/mwbot-rs |
repository | https://gitlab.wikimedia.org/repos/mwbot-rs/mwbot/ |
max_upload_size | |
id | 411656 |
Cargo.toml error: | TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
A MediaWiki API client library.
mwapi
is a low-level library for the MediaWiki Action API.
If you intend to edit pages or want a higher-level interface, it's recommended to use mwbot
,
which builds on top of this crate.
tracing
crate) for visiblity into errorslet client = mwapi::Client::builder("https://en.wikipedia.org/w/api.php")
.set_user_agent("mwapi demo")
// Provide credentials for login:
// .set_botpassword("username", "password")
.build().await?;
let resp = client.get_value(&[
("action", "query"),
("prop", "info"),
("titles", "Taylor Swift"),
]).await?;
let info = resp["query"]["pages"][0].clone();
assert_eq!(info["ns"].as_u64().unwrap(), 0);
assert_eq!(info["title"].as_str().unwrap(), "Taylor Swift");
post_with_token
upload
feature)mwbot
provides a higher level interface to
interacting with MediaWikimwapi_responses
is a macro to
generate strict types for dynamic API queriesmwapi
is a part of the mwbot-rs
project.
We're always looking for new contributors, please reach out
if you're interested!
This crate is released under GPL-3.0-or-later. See COPYING for details.