diff --git a/src/lib.rs b/src/lib.rs index 2dadd3e..f4aca2e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -26,7 +26,7 @@ async fn main() -> Result<(), Box> { Ok(()) }*/ -async fn get_likes(user_id: u64, client_id: String, app_version: String) -> Result, Box> { +pub async fn get_likes(user_id: u64, client_id: String, app_version: String) -> Result, Box> { 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> { +pub async fn get_playlists(user_id: u64, client_id: String, app_version: String) -> Result> { 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, Box> { +pub async fn get_app() -> Result, Box> { let client = reqwest::Client::new(); let resp = client.get(format!("{}/versions.json", SOUNDCLOUD_DOMAIN)) @@ -79,7 +79,7 @@ async fn get_app() -> Result, Box> { ) } -async fn get_client_id() -> Result, Box> { +pub async fn get_client_id() -> Result, Box> { let client = reqwest::Client::new(); let resp = client.get(format!("{}/soundcloud", SOUNDCLOUD_DOMAIN))