[package]
edition = "2021"
rust-version = "1.85"
name = "topstats"
version = "0.1.0"
build = false
exclude = [
"examples/",
"tests/",
".github/",
"justfile",
"deny.toml",
".actrc",
]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust SDK for the TopStats.gg API - Discord bot statistics tracking"
homepage = "https://topstats.gg"
documentation = "https://docs.rs/topstats"
readme = "README.md"
keywords = [
"discord",
"bot",
"statistics",
"topgg",
"api",
]
categories = [
"api-bindings",
"asynchronous",
]
license = "MIT"
repository = "https://github.com/top-stats/rust-sdk"
[package.metadata.docs.rs]
features = [
"async",
"reqwest-client",
"rustls-tls",
"tracing",
]
rustdoc-args = [
"--cfg",
"docsrs",
]
[features]
async = ["dep:futures-timer"]
blocking = ["maybe-async/is_sync"]
default = [
"async",
"reqwest-client",
"rustls-tls",
]
native-tls = ["reqwest?/native-tls"]
reqwest-client = ["dep:reqwest"]
rustls-tls = ["reqwest?/rustls"]
tracing = ["dep:tracing"]
ureq-client = ["dep:ureq"]
[lib]
name = "topstats"
path = "src/lib.rs"
[dependencies.async-trait]
version = "0.1"
[dependencies.chrono]
version = "0.4"
features = ["serde"]
[dependencies.futures-timer]
version = "3.0"
optional = true
[dependencies.maybe-async]
version = "0.2"
[dependencies.reqwest]
version = "0.13"
features = [
"json",
"query",
]
optional = true
default-features = false
[dependencies.serde]
version = "1.0"
features = ["derive"]
[dependencies.serde_json]
version = "1.0"
[dependencies.thiserror]
version = "2.0"
[dependencies.tracing]
version = "0.1"
optional = true
[dependencies.ureq]
version = "3.2"
features = ["json"]
optional = true
[dependencies.urlencoding]
version = "2.1"
[dev-dependencies.pretty_assertions]
version = "1.4"
[dev-dependencies.tokio]
version = "1.49"
features = [
"full",
"test-util",
]
[dev-dependencies.tokio-test]
version = "0.4"
[dev-dependencies.wiremock]
version = "0.6"
[lints.clippy]
module_name_repetitions = "allow"
must_use_candidate = "allow"
[lints.clippy.all]
level = "warn"
priority = -1
[lints.clippy.nursery]
level = "warn"
priority = -1
[lints.clippy.pedantic]
level = "warn"
priority = -1
[lints.rust]
unsafe_code = "forbid"