ddapi 2.0.2__tar.gz → 2.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ddapi-2.0.2 → ddapi-2.0.3}/Cargo.lock +1 -1
- {ddapi-2.0.2 → ddapi-2.0.3}/Cargo.toml +1 -1
- {ddapi-2.0.2 → ddapi-2.0.3}/PKG-INFO +1 -1
- {ddapi-2.0.2 → ddapi-2.0.3}/src/api/ddnet.rs +1 -1
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/query_map.rs +2 -1
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/schema_ddnet.rs +6 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.ai/rules.md +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.github/dependabot.yml +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.github/workflows/crate_type.yaml +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.github/workflows/rust.yml +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.github/workflows/schema_check.yml +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/.gitignore +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/LICENSE +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/README.md +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/pyproject.toml +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/python/ddapi/__init__.py +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/python/ddapi/_convert.py +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/python/ddapi/ddnet.py +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/python/ddapi/ddstats.py +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/release-guide.md +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/api/ddstats.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/api/mod.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/error.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/lib.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/python/ddstats.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/python/mod.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/latest_finishes.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/map.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/master.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/mod.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/player.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/query.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/query_mapper.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/releases_maps.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/skins.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddnet/status.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/ddstats.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/scheme/mod.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/util/encoding.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/util/mod.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/util/time.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/src/util/tw_addr.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddnet/latest_finishes.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddnet/map.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddnet/query.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddnet/query_map.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddnet/query_mapper.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddnet/status.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddstats/map.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/fixtures/ddstats/profile.json +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/python/test_ddapi.py +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/schema_ddstats.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/tests/util/mod.rs +0 -0
- {ddapi-2.0.2 → ddapi-2.0.3}/typos.toml +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
[package]
|
|
2
2
|
name = "ddapi-rs"
|
|
3
3
|
description = "A simple Rust library to get data from DDNet and DDStats APIs"
|
|
4
|
-
version = "2.0.
|
|
4
|
+
version = "2.0.3"
|
|
5
5
|
authors = ["ByFox213 <byfox213@gmail.com>"]
|
|
6
6
|
edition = "2021"
|
|
7
7
|
repository = "https://github.com/ByFox213/ddapi-rs"
|
|
@@ -119,7 +119,7 @@ impl DDnetApi for DDApi {
|
|
|
119
119
|
/// let api = DDApi::new();
|
|
120
120
|
/// let query: Vec<QueryMap> = api.query_map("multi").await?;
|
|
121
121
|
/// for map in &query {
|
|
122
|
-
/// println!("{}: {} | {}", map.name, map.mapper, map.r#type);
|
|
122
|
+
/// println!("{}: {} | {}", map.name, map.mapper.as_deref().unwrap_or(""), map.r#type);
|
|
123
123
|
/// }
|
|
124
124
|
/// ```
|
|
125
125
|
async fn query_map(&self, map: &str) -> Result<Vec<QueryMap>> {
|
|
@@ -36,6 +36,12 @@ fn query_map_schema_matches() {
|
|
|
36
36
|
assert_schema_matches::<Vec<QueryMap>>(&load_fixture("ddnet/query_map.json"));
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
+
#[test]
|
|
40
|
+
fn query_map_without_mapper_matches() {
|
|
41
|
+
let raw = r#"[{"name": "1TeeMap", "type": "Oldschool"}]"#;
|
|
42
|
+
assert_schema_matches::<Vec<QueryMap>>(raw);
|
|
43
|
+
}
|
|
44
|
+
|
|
39
45
|
#[test]
|
|
40
46
|
fn query_mapper_schema_matches() {
|
|
41
47
|
assert_schema_matches::<Vec<QueryMapper>>(&load_fixture("ddnet/query_mapper.json"));
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|