pub fn new() -> Result<HNClient> {
        let timeout = CONFIG.get().unwrap().client.client_timeout;
        Ok(HNClient {
            client: ureq::AgentBuilder::new()
                .timeout(Duration::from_secs(timeout))
                .build(),
            story_caches: Arc::new(RwLock::new(HashMap::new())),
        })
    }
/// Create a new Hacker News Client
Create a new Hacker News Client
Create a new Hacker News Client
pub fn new() -> Result<HNClient> {
        let timeout = CONFIG.get().unwrap().client.client_timeout;
        Ok(HNClient {
            client: ureq::AgentBuilder::new()
                .timeout(Duration::from_secs(timeout))
                .build(),
            story_caches: Arc::new(RwLock::new(HashMap::new())),
        })
    }
pub fn new ( ) -> Result < HNClient > { let timeout = CONFIG . get ( ) . unwrap ( ) . client . client_timeout ; Ok ( HNClient { client : ureq :: AgentBuilder :: new ( ) . timeout ( Duration :: from_secs ( timeout ) ) . build ( ) , story_caches : Arc :: new ( RwLock :: new ( HashMap :: new ( ) ) ) , } ) }
Create a new Hacker News Client
Create a new Hacker News Client