new file: .gitignore
new file: Cargo.lock new file: Cargo.toml new file: src/main.rs
This commit is contained in:
commit
a4f37099b1
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/target
|
1520
Cargo.lock
generated
Normal file
1520
Cargo.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
15
Cargo.toml
Normal file
15
Cargo.toml
Normal file
@ -0,0 +1,15 @@
|
||||
[package]
|
||||
name = "soundcloud"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
description = "A small rust crate for fetching data from soundcloud without developer account"
|
||||
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"] }
|
15
src/main.rs
Normal file
15
src/main.rs
Normal file
@ -0,0 +1,15 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
// https://soundcloud.com/versions.json
|
||||
|
||||
// likes: https://api-v2.soundcloud.com/users/774639751/likes?client_id=zFEmsF1cEZZQ92nRRXKOg7e6ibFR1L7c&limit=10&offset=0&linked_partitioning=1&app_version=1734537250&app_locale=en
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
let resp = reqwest::get("https://api-v2.soundcloud.com/users/774639751/playlists_without_albums?client_id=zFEmsF1cEZZQ92nRRXKOg7e6ibFR1L7c&limit=10&offset=0&linked_partitioning=1&app_version=1734537250&app_locale=en")
|
||||
.await?
|
||||
.json::<HashMap<String, String>>()
|
||||
.await?;
|
||||
println!("{resp:#?}");
|
||||
Ok(())
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user