newsdata-io-api 0.9.1

Rust binding for the api of Newsdata.io
Documentation
use ureq::{Agent, AgentBuilder};

use super::Auth;

pub struct NewsdataIO {
    pub auth: Auth,
    pub(crate) agent: Agent,
}

impl Clone for NewsdataIO {
    fn clone(&self) -> Self {
        Self {
            auth: self.auth.clone(),
            agent: self.agent.clone(),
        }
    }
}

impl NewsdataIO {
    pub fn new(auth: Auth) -> Self {
        Self {
            auth,
            agent: AgentBuilder::new().build(),
        }
    }
}