use crate::http_client::HttpClient;
use crate::url;

pub async fn get_request(actor: String, cursor: Option<String>) -> String {
    let base_url = url(&"followers");
    let cursor = cursor.unwrap();
    let url = format!("{}?actor={}&cursor={}", base_url, actor, cursor);
    let client = HttpClient::new();

    match client.get_with_auth(&url).await {
        Ok(response) => response,
        Err(e) => format!("Error: {}", e),
    }
}
