amber-api 2.0.0

Rust client for Amber Electric's API
Documentation
# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2024"
name = "amber-api"
version = "2.0.0"
authors = ["JP-Ellis <josh@jpellis.me>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "Rust client for Amber Electric's API"
readme = "README.md"
keywords = [
    "amber",
    "amber-electric",
    "api",
]
categories = ["api-bindings"]
license = "MIT"
repository = "https://github.com/JP-Ellis/amber-api"

[features]

[lib]
name = "amber_api"
path = "src/lib.rs"

[[example]]
name = "current_prices"
path = "examples/current_prices.rs"

[[example]]
name = "current_prices_complete"
path = "examples/current_prices_complete.rs"

[[example]]
name = "get_sites"
path = "examples/get_sites.rs"

[[example]]
name = "prices"
path = "examples/prices.rs"

[[example]]
name = "renewables"
path = "examples/renewables.rs"

[[example]]
name = "renewables_complete"
path = "examples/renewables_complete.rs"

[[example]]
name = "renewables_with_resolution"
path = "examples/renewables_with_resolution.rs"

[[example]]
name = "usage"
path = "examples/usage.rs"

[[test]]
name = "integration"
path = "tests/integration.rs"

[dependencies.bon]
version = "~3"
features = ["alloc"]
default-features = false

[dependencies.jiff]
version = "~0"
features = [
    "alloc",
    "perf-inline",
    "serde",
]
default-features = false

[dependencies.reqwest]
version = "~0.13"
features = [
    "json",
    "query",
    "rustls",
]
default-features = false

[dependencies.serde]
version = "~1"
features = [
    "alloc",
    "derive",
]
default-features = false

[dependencies.thiserror]
version = "~2"

[dependencies.tokio]
version = "~1"
features = ["time"]
default-features = false

[dependencies.tracing]
version = "0.1.41"
features = [
    "attributes",
    "log",
]
default-features = false

[dev-dependencies.anyhow]
version = "=1.0.100"

[dev-dependencies.insta]
version = "=1.46.1"

[dev-dependencies.pretty_assertions]
version = "=1.4.1"

[dev-dependencies.rstest]
version = "=0.26.1"

[dev-dependencies.serde_json]
version = "=1.0.149"

[dev-dependencies.tokio]
version = "=1.49.0"
features = [
    "macros",
    "rt-multi-thread",
]

[lints.clippy]
arbitrary_source_item_ordering = "allow"
blanket-clippy-restriction-lints = "allow"
cognitive_complexity = "allow"
else_if_without_else = "allow"
empty_structs_with_brackets = "allow"
impl_trait_in_params = "allow"
implicit_return = "allow"
min_ident_chars = "allow"
missing_trait_methods = "allow"
panic_in_result_fn = "allow"
pattern_type_mismatch = "allow"
pub_with_shorthand = "allow"
question_mark_used = "allow"
ref_patterns = "allow"
return_and_then = "allow"
self_named_module_files = "allow"
separated_literal_suffix = "allow"
single_call_fn = "allow"
single_char_lifetime_names = "allow"
unreachable = "allow"

[lints.clippy.cargo]
level = "warn"
priority = -1

[lints.clippy.complexity]
level = "warn"
priority = -1

[lints.clippy.correctness]
level = "warn"
priority = -1

[lints.clippy.pedantic]
level = "warn"
priority = -1

[lints.clippy.perf]
level = "warn"
priority = -1

[lints.clippy.restriction]
level = "warn"
priority = -1

[lints.clippy.style]
level = "warn"
priority = -1

[lints.clippy.suspicious]
level = "warn"
priority = -1

[lints.rust]
future-incompatible = "warn"
missing_docs = "warn"
warnings = "warn"

[lints.rustdoc]
missing-crate-level-docs = "warn"