diff --git a/Cargo.lock b/Cargo.lock index 92c0db4..bbb2a51 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,6 +17,15 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + [[package]] name = "atomic-waker" version = "1.1.2" @@ -751,6 +760,35 @@ dependencies = [ "bitflags", ] +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + [[package]] name = "reqwest" version = "0.12.9" @@ -999,7 +1037,10 @@ dependencies = [ name = "soundcloud" version = "0.1.0" dependencies = [ + "regex", "reqwest", + "serde", + "serde_json", "tokio", ] diff --git a/Cargo.toml b/Cargo.toml index 4e7cf30..e6fe140 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -7,9 +7,9 @@ authors = ["alterwain"] keywords = ["api", "network", "audio", "music"] categories = ["network-programming", "asynchronous", "api", "music", "audio"] -[lib] -crate-type = ["staticlib", "cdylib", "lib"] - [dependencies] reqwest = { version = "0.12", features = ["json"] } -tokio = { version = "1", features = ["full"] } \ No newline at end of file +tokio = { version = "1", features = ["full"] } +regex = "1.11.1" +serde = { version = "1.0.104", features = ["derive"] } +serde_json = "1.0.48" \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index d4d8d8f..36e72ba 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,15 +1,84 @@ -use std::collections::HashMap; +use std::{collections::HashMap, error::Error}; + +use regex::Regex; + +/* + +[lib] +crate-type = ["staticlib", "cdylib", "lib"] +*/ + +// https://soundcloud.com/soundcloud regex: "