[package] name = "twitch_api" version = "0.7.0-rc.8" authors = ["Emil Gardström "] edition = "2018" repository = "https://github.com/twitch-rs/twitch_api" license = "MIT OR Apache-2.0" description = "Library for talking with the new Twitch API aka. \"Helix\", EventSub and more!" keywords = ["oauth", "twitch", "async", "asynchronous", "api"] documentation = "https://docs.rs/twitch_api/0.7.0-rc.8" readme = "README.md" resolver = "2" include = [ "src/*", "./Cargo.toml", "examples/*", "./README.md", "CONTRIBUTING.md", "CHANGELOG.md", "LICENSE*", ] rust-version = "1.77.0" [workspace] members = ["xtask", "examples/*"] exclude = ["twitch_types", "twitch_oauth2"] [workspace.dependencies] twitch_api = { version = "0.7.0-rc.8", path = "." } twitch_oauth2 = { version = "0.14.0", path = "twitch_oauth2/" } twitch_types = { version = "0.4.5", features = [ "serde", ], path = "./twitch_types" } ureq = { version = "2.10.1", default-features = false, features = [ "tls", ]} url = "2.5.2" [dependencies] thiserror = "1.0.50" displaydoc = "0.2.5" http = "1.1.0" typed-builder = { version = "0.20.0", optional = true } url = { workspace = true } once_cell = "1.19.0" twitch_oauth2 = { workspace = true, optional = true } serde = { version = "1.0.190" } serde_derive = { version = "1.0.190" } serde_path_to_error = { version = "0.1.14", optional = true } async-trait = { version = "0.1.74", optional = true } serde_json = { version = "1.0.107", optional = true } serde_ignored = { version = "0.1.9", optional = true } tracing = { version = "0.1.40", optional = true } ureq = { workspace = true, optional = true } reqwest = { version = "0.12.5", optional = true, default-features = false } surf = { version = "2.3.2", optional = true, default-features = false } http-types = { version = "2.12.0", optional = true, features = [ "hyperium_http", ] } sha2 = { version = "0.10.8", optional = true } crypto_hmac = { package = "hmac", version = "0.12.1", optional = true } aliri_braid = "0.4.0" futures = { version = "0.3.28", optional = true } hyper = { version = "1.4.1", optional = true } http-body-util = { version = "0.1.1", optional = true } twitch_types = { workspace = true } tower-service = { version = "0.3.2", optional = true } [features] default = ["deser_borrow"] client = ["twitch_oauth2/client", "dep:futures", "dep:hyper"] unsupported = ["serde_json?/raw_value", "beta"] beta = [] deny_unknown_fields = [] trace_unknown_fields = ["dep:serde_ignored", "tracing"] serde_json = ["dep:serde_json", "dep:serde_path_to_error"] helix = [ "twitch_types/color", "twitch_types/emote", "twitch_types/goal", "twitch_types/moderation", "twitch_types/points", "twitch_types/stream", "twitch_types/timestamp", "twitch_types/user", "dep:async-trait", "serde_json", "dep:hyper", ] deser_borrow = [] surf = [ "dep:surf", "dep:http-types", "client", "twitch_oauth2/surf", ] ureq = ["dep:ureq", "client"] reqwest = ["dep:reqwest", "client", "twitch_oauth2/reqwest"] tower = ["dep:tower-service", "dep:http-body-util", "client"] pubsub = [ "serde_json", "twitch_types/emote", "twitch_types/moderation", "twitch_types/stream", "twitch_types/timestamp", "twitch_types/user", "twitch_types/points", ] eventsub = [ "serde_json/raw_value", "twitch_types/emote", "twitch_types/eventsub", "twitch_types/goal", "twitch_types/points", "twitch_types/stream", "twitch_types/timestamp", "twitch_types/sub", "twitch_types/color", ] hmac = ["dep:crypto_hmac", "dep:sha2"] mock_api = ["twitch_oauth2?/mock_api"] all = [ "helix", "client", "pubsub", "eventsub", "hmac", "twitch_oauth2", "tracing", "twitch_types/time", ] _all = [ "all", "typed-builder", "surf", "reqwest", "ureq", "twitch_oauth2/surf_client_curl", "mock_api", "tower", ] [dev-dependencies] tokio = { version = "1.40.0", features = ["rt-multi-thread", "macros"] } dotenvy = "0.15.7" futures = "0.3.28" serde_cbor = "0.11.2" serde_json = "1.0.107" reqwest = "0.12.2" hyper = "1.4.1" [build-dependencies] tower = "0.4.13" version_check = "0.9.4" [[example]] name = "automod_check" path = "examples/automod_check.rs" required-features = ["reqwest", "helix"] [[example]] name = "get_channel_status" path = "examples/get_channel_status.rs" required-features = ["reqwest", "helix"] [[example]] name = "get_moderation" path = "examples/get_moderation.rs" required-features = ["reqwest", "helix"] [[example]] name = "get_streams" path = "examples/get_streams.rs" required-features = ["reqwest", "helix"] [[example]] name = "modify_channel" path = "examples/modify_channel.rs" required-features = ["reqwest", "helix"] [[example]] name = "client" path = "examples/client.rs" required-features = ["reqwest", "helix"] [[example]] name = "channel_information" path = "examples/channel_information.rs" required-features = ["reqwest", "helix"] [[example]] name = "channel_information_custom" path = "examples/channel_information_custom.rs" required-features = ["reqwest", "helix", "unsupported"] [[example]] name = "followed_streams" path = "examples/followed_streams.rs" required-features = ["reqwest", "helix"] [[example]] name = "mock_api" path = "examples/mock_api.rs" required-features = ["reqwest", "helix", "mock_api", "twitch_oauth2/mock_api"] [package.metadata.docs.rs] features = ["all", "unsupported", "_all"] rustc-args = ["--cfg", "nightly"] rustdoc-args = ["--cfg", "nightly"] cargo-args = ["-Zunstable-options", "-Zrustdoc-scrape-examples"] [profile.dev.package.backtrace] opt-level = 3 #workaround for using different twitch_types [patch.crates-io.twitch_types] path = "./twitch_types" [lints.rust] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(_internal_never)', 'cfg(nightly)'] }