Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ytmapi_rs: Update deps & ytmapi version #40

Merged
merged 4 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions ytmapi-rs/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ytmapi-rs"
version = "0.0.2"
version = "0.0.3"
edition = "2021"
authors = ["nick42d"]
license = "MIT"
Expand All @@ -10,23 +10,23 @@ repository = "https://github.com/nick42d/youtui"
readme = "README.md"

[dependencies]
tokio = {version = "1.29.1", features = ["full"]}
tokio = {version = "1.38.0", features = ["full"]}
# To allow alternative TLS options, we need to opt out of a single reqwest feature.
# This isn't possible in Cargo, so we need to opt back into the other default features.
# https://github.com/rust-lang/cargo/issues/3126
# As of 26/4/24 the following are reqwest default features:
# http2, default-tls, charset
reqwest = {version = "0.12.1", features = ["json", "http2", "charset"], default-features = false}
serde = {version = "1.0.164", features = ["derive"]}
serde_json = "1.0.99"
sha1 = "0.10.5"
tokio-stream = "0.1.14"
reqwest = {version = "0.12.4", features = ["json", "http2", "charset"], default-features = false}
serde = {version = "1.0.203", features = ["derive"]}
serde_json = "1.0.117"
sha1 = "0.10.6"
tokio-stream = "0.1.15"
async-stream = "0.3.5"
const_format = "0.2.31"
chrono = "0.4.31"
const_format = "0.2.32"
chrono = "0.4.38"

[dev-dependencies]
pretty_assertions = "1"
pretty_assertions = "1.4.0"

[features]
# Provide alternative TLS options, but use reqwest's default by default.
Expand Down
2 changes: 2 additions & 0 deletions ytmapi-rs/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ pub struct Error {
}

/// The kind of the error.
/// This list may grow over time, and it's not recommended to exhaustively match on it.
#[non_exhaustive]
pub enum ErrorKind {
/// General web error.
// TODO: improve and avoid leaking reqwest::Error
Expand Down
12 changes: 11 additions & 1 deletion ytmapi-rs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! # ytmapi_rs
//! Library into YouTube Music's internal API.
//! ## Examples
//! Basic usage with a pre-created cookie file :
Expand Down Expand Up @@ -29,6 +30,15 @@
//! Ok(())
//! }
//! ```
//! ## Optional Features
//! ### TLS
//! NOTE: To use an alternative TLS, you will need to specify `default-features = false`.
//! As reqwest preferentially uses default-tls when multiple TLS features are enabled.
//! See reqwest docs for more information.
//! https://docs.rs/reqwest/latest/reqwest/tls/index.html
//! - **default-tls** *(enabled by default)*: Utilises the default TLS from reqwest - at the time of writing is native-tls.
//! - **native-tls**: This feature forces use of the the native-tls crate, reliant on vendors tls.
//! - **rustls-tls**: This feature forces use of the rustls crate, written in rust.
use auth::{
browser::BrowserToken, oauth::OAuthDeviceCode, AuthToken, OAuthToken, OAuthTokenGenerator,
};
Expand Down Expand Up @@ -64,7 +74,7 @@ mod nav_consts;
// Consider if pub is correct for this
pub mod common;
mod crawler;
mod error;
pub mod error;
pub mod parse;
mod process;
pub mod query;
Expand Down
Loading