modified: src/lib.rs
This commit is contained in:
parent
e5d3306bf7
commit
3c29b0714f
@ -26,7 +26,7 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
Ok(())
|
||||
}*/
|
||||
|
||||
async fn get_likes(user_id: u64, client_id: String, app_version: String) -> Result<Option<String>, Box<dyn Error>> {
|
||||
pub async fn get_likes(user_id: u64, client_id: String, app_version: String) -> Result<Option<String>, Box<dyn Error>> {
|
||||
let client = reqwest::Client::new();
|
||||
|
||||
let resp = client.get(format!("https://{}/users/{}/likes?client_id={}&limit=10&offset=0&linked_partitioning=1&app_version={}&app_locale=en", SOUNDCLOUD_API_DOMAIN, user_id, client_id, app_version) )
|
||||
@ -39,7 +39,7 @@ async fn get_likes(user_id: u64, client_id: String, app_version: String) -> Resu
|
||||
Ok(Some(resp))
|
||||
}
|
||||
|
||||
async fn get_playlists(user_id: u64, client_id: String, app_version: String) -> Result<CloudPlaylists, Box<dyn Error>> {
|
||||
pub async fn get_playlists(user_id: u64, client_id: String, app_version: String) -> Result<CloudPlaylists, Box<dyn Error>> {
|
||||
let client = reqwest::Client::new();
|
||||
|
||||
let resp = client.get(format!("https://{}/users/{}/playlists_without_albums?client_id={}&limit=10&offset=0&linked_partitioning=1&app_version={}&app_locale=en", SOUNDCLOUD_API_DOMAIN, user_id, client_id, app_version))
|
||||
@ -54,7 +54,7 @@ async fn get_playlists(user_id: u64, client_id: String, app_version: String) ->
|
||||
Ok(playlists)
|
||||
}
|
||||
|
||||
async fn get_app() -> Result<Option<String>, Box<dyn Error>> {
|
||||
pub async fn get_app() -> Result<Option<String>, Box<dyn Error>> {
|
||||
let client = reqwest::Client::new();
|
||||
|
||||
let resp = client.get(format!("{}/versions.json", SOUNDCLOUD_DOMAIN))
|
||||
@ -79,7 +79,7 @@ async fn get_app() -> Result<Option<String>, Box<dyn Error>> {
|
||||
)
|
||||
}
|
||||
|
||||
async fn get_client_id() -> Result<Option<String>, Box<dyn Error>> {
|
||||
pub async fn get_client_id() -> Result<Option<String>, Box<dyn Error>> {
|
||||
let client = reqwest::Client::new();
|
||||
|
||||
let resp = client.get(format!("{}/soundcloud", SOUNDCLOUD_DOMAIN))
|
||||
|
Loading…
x
Reference in New Issue
Block a user