mwapi_responses 0.5.1

Automatically generate strict types for MediaWiki API responses
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// Autogenerated by gen_tests.py
use mwapi_responses::prelude::*;

mod test_client;

#[query(action = "query", prop = "categoryinfo")]
struct Response0;

#[tokio::test]
async fn query_categoryinfo_default() {
    let mut params = Response0::params().to_vec();
    params.push(("titles", "Category:Taylor Swift|Category:Living people"));
    let resp: Response0 = test_client::test(&params).await.unwrap();
    assert_eq!(resp.items().len(), 2);
    assert!(resp.continue_.is_empty());
}